Fatal Error with Mail()

Home Forums Quform PHP Fatal Error with Mail()

This topic is: not resolved
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #5159
    shorthills11
    Participant

    Hi,
    I have a site where I use two instances of the form. The first is process.php, and the second is process2.php. So two different forms (each on its own page), and two different process.php files.

    All was fine until yesterday when the following error began to appear on both forms:

    There was a problem
    Fatal error: Uncaught exception 'phpmailerException' with message 'Could not instantiate mail function.' in /home/ivfcen/public_html/content/ivf_treatments/quform/lib/class.phpmailer.php:797
    Stack trace:
    #0 /home/ivfcen/public_html/content/ivf_treatments/quform/lib/class.phpmailer.php(680): PHPMailer->MailSend('Date: Sun, 7 Ju...', '--b1_46e79ee30e...')
    #1 /home/ivfcen/public_html/content/ivf_treatments/quform/lib/class.phpmailer.php(606): PHPMailer->PostSend()
    #2 /home/ivfcen/public_html/content/ivf_treatments/quform/process2.php(847): PHPMailer->Send()
    #3 /home/ivfcen/public_html/content/ivf_treatments/quform/process2.php(904): process()
    #4 {main}
    thrown in /home/ivfcen/public_html/content/ivf_treatments/quform/lib/class.phpmailer.php on line 797

    I went into process.php and I changed the $config['from'] = '%email%'; from an email address to what you see above, and it was fixed!

    I made the exact same change on process2.php, and the error above is still being thrown.

    Any advice on how to fix this is much appreciated!
    Note that the original reply to email was an email not hosted on the server (e..g they host in one place, and have email somewhere else).

    Thanks!

    #5169
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #5184
    shorthills11
    Participant

    Thanks for your reply. I changed process.php to “mail” and it was fine. But when I changed process2.php then it still throws the error. Process2.php is around 20 fields whereas process1.php is around 4. Could that be making the difference? the amount of data being passed?

    for whatever it’s worth if I turn off mail (e.g. make it false) then the script processes — so clearly it’s in the mail function.

    But my host says it’s the script because one works and one doesn’t.
    What’s the best way to proceed?
    Thanks.

    #5186
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #5218
    shorthills11
    Participant

    THanks for your quick replies — I really appreciate it! I’m working with my host now…

    #5331
    shorthills11
    Participant

    So I switched to SMTP and the form now processes, but I get no email. And the host verified all is fine on their end.

    The only thing I can think of is that I’m leaving the encryption parameter blank because they said there’s no encryption setting needed. If I leave

    /*’encryption’ => ” */

    blank or commented out, will that cause it not to send email?
    thanks!

    #5344
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy