Firefox PHP

Mail through SMTP-Module

Posted by Thomas Seifert 
Re: Mail through SMTP-Module
November 09, 2006 02:18PM
Well i got it to work, sort of, in that I was able to receive a new user notification, email verification message.

Now I get this crash: it seems serious.

Fatal error: Cannot redeclare class phpmailer in /usr/local/pem/vhosts/109743/webspace/httpdocs/mods/smtp_mail/phpmailer/class.phpmailer.php on line 21


Any ideas?

Thanks

Jon
Re: Mail through SMTP-Module
November 09, 2006 05:05PM
what did you do to get this message?
seems like you loaded phpmailer before already.


Thomas Seifert
Re: Mail through SMTP-Module
November 10, 2006 08:55AM
I just installed the mod phpmailer.
Re: Mail through SMTP-Module
November 10, 2006 11:41AM
> the mod phpmailer

there is nothing like that.

also on irc you told that you installed another mod for registration notification. maybe that uses phpmailer on its own already.


Thomas Seifert
Re: Mail through SMTP-Module
March 14, 2007 04:34AM
Hello there,

I installed version 0.7. I have an internal smtp server. Whenever I do something that will send out an email notification, I received the following message:

Error while sending mails in one-at-a-time mode ... Error was: The following From address failed: "XXXX"

This happens regardless the value I placed in the From address field under "General Settings".

Did I do something wrong here?
Re: Mail through SMTP-Module
March 14, 2007 04:52AM
Somehow the module failed in delivering the message to the mailserver. Check your mail server logs, since those might give more information.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Mail through SMTP-Module
March 14, 2007 06:01AM
Thanks. Will check that again.
Re: Mail through SMTP-Module
May 24, 2007 09:25PM
Hello Thomas
I'm using v0.7 under Phorum v5.1.22 and ran into similar issues other users here are reporting.
Here my solutions to fix these issues.

First one: "Fatal error: Cannot redeclare class phpmailer"
This error occurs when there are multiple mails to send (i.e. when using Group Auto-Email Module).
To fix this, change line 27 in smtp_mail.php to
include_once('./mods/smtp_mail/phpmailer/class.phpmailer.php');

Second: "Error while sending mails in one-at-a-time mode ... Error was: The following From address failed: "XXXX" "
This is due to some inconsistence of class.phpmailer.php and mail sending routine of Phorum in email_functions.php .
$mail->From expects a string in the form of "user@host.net" , but $data['from'] contains a string in form of "\"John Doe\" <user@host.net>" (have a look at line 68 in email_functions.php).
To fix this, in smtp_mail.php line 42 and 43, simply replace
$mail->From = $from;
$mail->FromName = "Phorum";
by
$mail->From = $PHORUM["system_email_from_address"];
$mail->FromName = $PHORUM["system_email_from_name"];

greetz from Switzerland
JayBee



Edited 1 time(s). Last edit at 05/24/2007 09:31PM by jaybee.
Re: Mail through SMTP-Module
May 30, 2007 08:54AM
Thanks for the fixes.
I added them to the release package.


Thomas Seifert
Re: Mail through SMTP-Module
July 19, 2007 04:54AM
I've got error
----------------------------------------------------------------------
Error while sending mails in one-at-a-time mode ... Error was: Unknown encoding: windows-1251Error while sending mails in one-at-a-time mode ... Error was: Unknown encoding: windows-1251
Warning: Cannot modify header information - headers already sent by (output started at /usr/home/taurusc/public_html/phorum/mods/smtp_mail/smtp_mail.php:73) in /usr/home/taurusc/public_html/phorum/common.php on line 891
----------------------------------------------------------------------

Phorum version 5.1.19
I've tried to change charset to:
var $CharSet = "windows-1251";
But w/o results...

Alexander Medentsev. Moscow. Russia.
Sorry, only registered users may post in this forum.

Click here to login