email - Outlook not receiving e-mails from php script -


okay, i'm @ whit's end here. have client site hosted on godaddy , uses outlook. i've written php script send mail 1 of domain e-mail addresses contact form on website.

i can e-mail send every single service except outlook/exchange/live/microsoft accounts.

i read using phpmailer idea, i'm using send mail:

//$mail->issmtp(); // telling class use smtp $mail->smtpdebug  = 2;                       $mail->smtpauth   = true;                    $mail->smtpsecure = "ssl";                   $mail->host       = "a2plcpnl0287.prod.iad2.secureserver.net";        $mail->port       = 465;                     $mail->username   = "test@alamohomefinance.com";     $mail->password   = "xxxxxxx";           $mail->setfrom('yourname@yourdomain.com', 'first last'); $mail->addreplyto("name@yourdomain.com","first last"); $mail->subject    = "phpmailer test subject via smtp (hotmail), basic"; $mail->altbody    = "to view message, please use html compatible email viewer!";  $mail->msghtml($body);  $address = "jakerevans2@live.com";   if(!$mail->send()) {     error_log("error calculator!". $mail->errorinfo);  } else {  error_log("success calculator!"); } 

this e-mail gets sent gmail account , others, not .live account or client's outlook address.

i've tried i've found on internet far, nothing working. ideas or thoughts anyone?

thanks!

edit: godaddy server has spf record reads: v=spf1 include:spf.protection.outlook.com -all

i've created dkim key https://www.port25.com/dkim-wizard/ , added dkim txt record godaddy, following details:

host: key1._domainkey.alamohomefinance.com txt value: k=rsa\; p=miibija...

i've added dkim record, following details: name: _dmarc.alamohomefinance.com txt value: v=dmarc1; p=quarantine; sp=none; ruf=mailto:user@example.com; rf=afrf; pct=100; ri=86400

am testing see if these changes make difference...

first up, should @ the phpmailer troubleshooting guide, has little section on godaddy, , many other problems.

you better feedback on what's going on if enable debug output of server messages, set smtpdebug = 2, , see says.

godaddy known block outbound smtp, , either fail connect (see many questions on that), or cause tls verification failures redirected transparently mail servers.

in code you've got smtp.live.com host, username:

$mail->username   = "a2plcpnl0287.prod.iad2.secureserver.net" 

secureserver.net domain used godaddy's mail servers, , user name name of actual godaddy mail server, seems unlikely should using user id live.com, since godaddy rotating mail servers frequently, you're unlikely same 1 every time - really login id live.com?

i'm suspicious of phrasing of question: not need connect live.com send email live.com - there's nothing stopping sending live.com address connection through gmail, sounds may have conceptual issue. host, username , password properties mail server send out through, not sending mail to.

as said, godaddy doesn't allow remote smtp @ all, i'm surprised if you've had working without using godaddy mail server, suspect you've had else work, not think.

i can see you've based code on obsolete example, make sure you're running latest phpmailer.

update:

i noticed critical. code not call $mail->issmtp();. means it's not using smtp @ all, it's using default mail() function, , such none of smtp config makes difference @ all. message submitted local mail server, relay through godaddy's server. in mail server's log file see what's happening, in /var/log/mail.log or similar.


Comments