Firefox PHP

Mail through SMTP-Module

Posted by Thomas Seifert 
All files from this thread

File Name File Size   Posted by Date  
smtp_mail_v0.5.zip 2 KB open | download Thomas Seifert 03/04/2004 Read message
smtp_mail-v0.8.zip 18.1 KB open | download Thomas Seifert 05/30/2007 Read message
Mail through SMTP-Module
March 04, 2004 01:53PM
I made this module for allowing users which don't have a local mailserver to use their ISPs mailserver or similar. It allows to use smtp-auth too.
Most often this is needed for windows installs.


This Module REQUIRES Phorum 5.0.4 or a recent CVS-version as I only added the send_mail hook right now!
Also you need to install two Pear-classes:
Mail
Mail_Mime
with their requirements


You can configure this module through the Module-Admin.
Once you enable this module the internal mail-function from PHP is no longer used.

Attention, I see this module as Beta-Quality, try it out but no promises.


Have fun!




Thomas Seifert
Attachments:
open | download - smtp_mail_v0.5.zip (2 KB)
Re: Mail through SMTP-Module
August 04, 2006 04:00PM
attached is version 0.6 of that module.
It doesn't use pear-mail any longer but contains phpmailer ( [phpmailer.sf.net] ).
Therefore you don't need to install or configure any additional stuff.
just upload the whole directory from the archive to the mods-directory, configure the module in the admin -> modules -section and turn it on.
Then all posts should be sent through smtp.

If an error-message occurs, it will be printed on the screen on sending, so first try the module with some messages which should send mails.

Edit: updated to version 0.7 which fixes a bug in using smtp-authentication.
Edit: updated to version 0.8 which includes bugfixes from jaybee


Thomas Seifert



Edited 3 time(s). Last edit at 05/30/2007 08:53AM by ts77.
Attachments:
open | download - smtp_mail-v0.8.zip (18.1 KB)
Re: Mail through SMTP-Module
August 04, 2006 10:56PM
Hello Thomas,

I've downloaded 0.6, installed it without any errors. Its good that it doesnt require the PEAR modules :) However, it still doesnt work for me. The error I got was:

Error while sending mails in one-at-a-time mode ... Error was: SMTP Error: The following recipients failed: *******@hotmail.com
Warning: Cannot modify header information - headers already sent by (output started at /www/htdocs/forum/mods/smtp_mail/smtp_mail.php:73) in /tmp/tpl-default-header-toplevel_stage2-afea68c4e0ae9a16f896798ea851e0d8.php on line 5

I tried with 2 of my free SMTP accounts at GMail and Yahoo. Both produced the same error. Is there any other admin setting I need to do? I know there's the System From/Email in the General Settings page. Maybe you could let me know which external SMTP server you use, so I could do the same.

Thanks,
PSS
Re: Mail through SMTP-Module
August 05, 2006 02:35AM
I use my own smtp-server, no other external one.
I very much doubt that you can use some external one for heavy mail traffic.


Thomas Seifert
Re: Mail through SMTP-Module
September 10, 2006 07:17AM
Hello Thomas,

I've try your mod.
I have an error when i try to make a moderator alert for example.
"Error while sending mails in one-at-a-time mode ... Error was: SMTP Error: The following recipients failed: abc@abc.com"

I use my own smtp server.
Re: Mail through SMTP-Module
September 10, 2006 07:26AM
then check the mail-server logs why the mails weren't accepted.
abc@abc.com sounds like a bogus email-address (if this wasn't just an example).


Thomas Seifert
Re: Mail through SMTP-Module
October 24, 2006 09:57PM
Quote
passivity
Hello Thomas,

I've downloaded 0.6, installed it without any errors. Its good that it doesnt require the PEAR modules :) However, it still doesnt work for me. The error I got was:

Error while sending mails in one-at-a-time mode ... Error was: SMTP Error: The following recipients failed: *******@hotmail.com
Warning: Cannot modify header information - headers already sent by (output started at /www/htdocs/forum/mods/smtp_mail/smtp_mail.php:73) in /tmp/tpl-default-header-toplevel_stage2-afea68c4e0ae9a16f896798ea851e0d8.php on line 5

I tried with 2 of my free SMTP accounts at GMail and Yahoo. Both produced the same error. Is there any other admin setting I need to do? I know there's the System From/Email in the General Settings page. Maybe you could let me know which external SMTP server you use, so I could do the same.

Thanks,
PSS

Hello! I have almost the same exact problem:

Error while sending mails in one-at-a-time mode ... Error was: The following From address failed: "webmaster@amapsi.org"
Warning: Cannot modify header information - headers already sent by (output started at /home/amapsi/public_html/foros/mods/smtp_mail/smtp_mail.php:73) in /tmp/tpl-default-header-toplevel_stage2-0b6c5b2755141d0e31748c3f000f7bb8.php on line 5


I do have my own smtp server. Any help would be appreciated.
Re: Mail through SMTP-Module
October 25, 2006 04:15AM
Somehow the delivery failed. So you should be able to see in your smtp server logs why the message was not accepted by the amapsi.org mailserver. I see there are no fallback MX records for their domain, so if this mailserver is down, then mail cannot be delivered at all. Maybe that was the case when you tried?

Note to those interested in doing some development: Maybe the module could use some work to handle mail problems more gracefully. The error output for the mail sending could be suppressed in case errors are handled otherwise.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Mail through SMTP-Module
November 07, 2006 04:30PM
New version 0.7 uploaded above which fixes a bug with using username / passwort in the phpmailer-version of the mod.


Thomas Seifert



Edited 1 time(s). Last edit at 11/07/2006 05:40PM by ts77.
Re: Mail through SMTP-Module
November 09, 2006 01:22PM
I continue to get

Error while sending mails in one-at-a-time mode ... Error was: SMTP Error: The following recipients failed: in****2@topolo....

i do not have access to php.ini.

i obtained the correct smtp address from my provider.

Any ideas how I can make this work?

Thanks

Jon
Sorry, only registered users may post in this forum.

Click here to login