dblevins Posted September 24, 2009 Share Posted September 24, 2009 I am trying to sent up my website hosted on Apache 2.2 to send emails. Unfortunatly my email sever requires SMTP authentication. I have tried this script but with no luck [mail function] ; For Win32 only. SMTP = mail.btinternet.com smtp_port = 25 Username = myname@btinternet.com password = ************ I have of course used a password and proper email address Can anyone help with this Quote Link to comment https://forums.phpfreaks.com/topic/175417-emails-and-phpini/ Share on other sites More sharing options...
sawade Posted October 5, 2009 Share Posted October 5, 2009 So your code looks like this? $to = $email . ', ' ; $to .= FORM_MAILER; $headers["From"] = MY EMAIL; $headers["Subject"] = "LALALA $date"; $smtp["host"] = SMTP_HOST; $smtp["port"] = SMTP_PORT; $smtp["auth"] = true; $smtp["username"] = SMTP_USERNAME; $smtp["password"] = SMTP_PASSWORD; $msg = "$date\n"; $msg = wordwrap($msg, 70); $mail = Mail::factory('smtp', $smtp); $mail->send($to, $headers, $msg) or die('Error accessing SMTP server.'); Quote Link to comment https://forums.phpfreaks.com/topic/175417-emails-and-phpini/#findComment-931020 Share on other sites More sharing options...
cags Posted October 5, 2009 Share Posted October 5, 2009 If your SMTP requires authentication then you cannot use the mail function. If your server has PEAR, I believe that has a function that supports authentication. Quote Link to comment https://forums.phpfreaks.com/topic/175417-emails-and-phpini/#findComment-931025 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.