Jump to content

Emails and php.ini


dblevins

Recommended Posts

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 = [email protected]

password = ************

 

I have of course used a password and proper email address

 

Can anyone help with this

Link to comment
https://forums.phpfreaks.com/topic/175417-emails-and-phpini/
Share on other sites

  • 2 weeks later...

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.');

Link to comment
https://forums.phpfreaks.com/topic/175417-emails-and-phpini/#findComment-931020
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.