By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,521 Members | 1,447 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,521 IT Pros & Developers. It's quick & easy.

smtp authentication

P: n/a
I am trying to use the mail function to send email. My ISP requires
authentication. What do I need to add to the mail function to make it work?

mail($to, $subject, $msg, $mailheaders);

Thank you...

Bruce A. Julseth
Jul 16 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
br*****@attglobal.net wrote:
I am trying to use the mail function to send email. My ISP requires
authentication. What do I need to add to the mail function to make it work?


mail() doesn't use a SMTP server but tries to send mail direct, calling
the sendmail program installed on the server or something similar.

For SMTP(Auth) access I suggest using the phpMailer class.
http://phpmailer.sourceforge.net

Jochen

--
/**
* @author Jochen Buennagel <zang at buennagel dot com>
*/

Jul 16 '05 #2

P: n/a
Hello,

On 08/23/2003 10:41 AM, br*****@attglobal.net wrote:
I am trying to use the mail function to send email. My ISP requires
authentication. What do I need to add to the mail function to make it work?

mail($to, $subject, $msg, $mailheaders);


The mail function does not support authentication. Youy may want try
this class for composing and sending e-mail messages that comes with a
wrapper function named smtp_mail() that emulates the mail() function.
You can configure several parameters that you are not allowed with the
mail() function, like for instance the authentication credentials as you
need.

http://www.phpclasses.org/mimemessage

You also need this for the actual message delivery:

http://www.phpclasses.org/smtpclass

--

Regards,
Manuel Lemos

Free ready to use OOP components written in PHP
http://www.phpclasses.org/

Jul 16 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.