Forums

Could not instantiate mail function

wutian1933 06 Jun, 2009
I installed chronoForms today and did some practises. I found the problem as the subject. I used dynamic name, email and etc. but seems not working.
I am enclosing the debug info.
Form passed first SPAM check OK
Form passed the submissions limit (if enabled) OK
Form passed the Image verification (if enabled) OK
Form passed the server side validation (if enabled) OK
$_POST Array: Array ( [name] => sdaf [number] => 12345 [email] => [email]123@gmail.com[/email] [Subject] => adfad [question] => adfadf [button_7] => Send to us [75f67ed799ca7f8fd121093f53aff06a] => 1 [1cf1] => e2797653bca48054843da12b9b0ca497 [chronoformname] => enquiry )
$_FILES Array: Array ( )
Form passed the plugins step (if enabled) OK
An email has been SENT successfully from () to [email]wutian1933@gmail.com[/email]
Debug End
GreyHead 06 Jun, 2009
Hi wutian1933,

Probably you don't have a mail server set of for your Joomla site.

Bob
wutian1933 06 Jun, 2009
Well, I am using php mail function with my Joomla.
Are there any settings i have to do?

I have done several websites with pure hand writting codes (invloving many languages including php and mysql), and this never happens.
GreyHead 06 Jun, 2009
Hi wutian1933,

No nothing special - ChronoForms uses the standard Joomla mail functions. If it's working correctly in Joomla then you won't normally see this error.

Bob
wutian1933 06 Jun, 2009
It seems that my ISP block port 25 because it is a locally hosted Joomla!
GreyHead 06 Jun, 2009
Hi wutian1933,

You'll probably have to use SMTP then - I think that's what ISP's who block port 25 usually require.

Bob
menchee 12 Jun, 2009
If sending a mail from an article is successful, but not from ChronoForm, does this SMTP issue is still relevant, even if the debug report shows OK for every step (and the database is updated correctly)?
nml375 12 Jun, 2009
Hi menchee,
This suggests that the email(s) in fact are dropped either by your hosting company's email server, or any other email server in between to the recipient, due to restrictive filters. Roughly put, some server think you are sending spam and simply drop it.

There are a few threads on the issue around the forum, but a few pointers:
[list]
  • Check if there's any SPF (sender policy framework) rules for the sender email. If you are using "Dynamic From", consider using a static From and either a Dynamic Reply-To, or include the reply-to address as an email link within the mail.

  • Try to use a valid email address on the domain your site is hosted (ie [email]something@yoursite.tld[/email]) as sender.

  • See if you can alter your email template to not resemble bulk email?

  • Check the spamfolder of the recipients inbox, chances are you'll find the email there. Check the headers of the mail; many times these provide valuable information on why your email got "junked".
  • [/list]

    Unfortunately, there is no universal solution to this, as different host admins and email server admins have different softwares, settings, and preferences/policies regarding spam. The above points should help in most cases though. Start with "trusted" from and to addresses, and see if your email gets through. Then try to extend with dynamic from/to/reply-to (if used at all) until your email gets junked again. Try to figure out a way around it, at that point.

    /Fredrik
    menchee 12 Jun, 2009
    Thank you Fredrik for your help.
    Unfortunately I still can't make works.

    I know about the SPF limit. I use only e-mails which are registered in my server ([email]myname@mydomain.net[/email]).
    I don't find any mail in any spam folder.
    The strange thing here (for me), is that sending a mail from Joomla in general is successful (using email icon from within an article). I use the same e-mail address as a 'from' (the one I set in the configuration panel of Joomla).
    And I know that the POST is successful since the database updates, in debug mode the results are good and the redirect works fine.

    I went through the threads in this forum, but most of them are versions about the SPF issue.

    I really appreciate your willing to assist, but hope you or somebody else have another approach.
    nml375 12 Jun, 2009
    Just a thought, have you tried using plain text instead of html in your email setup?
    Also, just to make sure, in the debug messages, do you see a line that explicitly state email sent? It should look like this:

    An email has been SENT successfully from (myname)myname@mydomain.net to [email]somewhere@somehost.com[/email]



    /Fredrik
    menchee 12 Jun, 2009
    Fredrik - thank you, thank you!
    Since I didn't have that line, and since you sent me to change the format of the email to text, I got a closer look at the Email properties, under the toolbox and found that I missed the 'Enabled'. Until now I only set it to YES in the General tab...

    So now it works! I spent maybe 15 hours, reading forums here and at the host. I learned a lot by the way, but was desperate.

    Thanks a lot.
    GreyHead 12 Jun, 2009
    Hi menchee,

    ChronoForms uses the same mailing code as Joomla so, if you can send an email from a Joomla article then you *should* be able to send one from ChronoForms.

    If the problem isn't with the email addresses (it very often is which is why we ask) then is the setup OK? Do you have enabled=1 in the Emails column for your form in the Forms Manager?

    Bob
    menchee 12 Jun, 2009
    Bob, You probably answered me while I was typing me feedback to Fredrik.
    So this one is solved, but yes - I also missed the enable=1.

    So maybe to summarize for the rest of the stragglers:

    1) Check the server side:
    a. Does a simple email from a standard article works?
    If not, then it is about the mail configuration of Joomla (Site> Global Configuration > Server > Mail setting)
    b. Make sure you write an email address which is registered in the server under the same domain.
    2) Check the form setup within chronoform:
    a. General tab: enable 'email the results'.
    b. Setup emails tab: under the toolbox, in the Email Properties make 'Enable' to YES
    also make sure you use e-mail address which is registered in the domain's server
    If your setup is right, after saving the form, in the forms management, you'll see 'Enabled:1'.
    If you set at the General Tab the 'Debug' to ON, after submitting the form you should have, beside the approval for the different phases, a line says:

    An email has been SENT successfully from (myname)myname@mydomain.net to [email]somewhere@somehost.com[/email]

    .

    This is not a full tutorial, but if you walk through the existing tutorials, than this one add a bit of clarifications. I hope.

    Thank you supporters here at the forum.
    Emanuel.
    GreyHead 13 Jun, 2009
    Hi Emmanuel,

    Yes, our posts must have crossed. Glad you got it fixed.

    Nice tutorial too, just a couple of things to add.
    [list]
  • Make sure that the To and From Emails are different
  • For preference don't test with by sending to a hotmail, yahoo, aol, or livemail account as they have more sensitive spam filters and are more likely to dump emails with technical irregularities, than some other hosts. (Once you have your emails set up correctly you should be able to send to any of these services.)
  • [/list]

    Bob
    This topic is locked and no more replies can be posted.