Jump to content

problems with mail()


djanim8

Recommended Posts

I get this any time I try to send an email to someone that IS NOT in the domain of the company:

 

Warning: mail() [function.mail]: SMTP server response: 503 This mail server requires authentication when attempting to send to a non-local e-mail address. Please check your mail client settings or contact your administrator to verify that the domain or address is defined for this server. in corpevent.php on line 21

 

I have it setup like this (I removed the email address domain...but its correct in the code):

 

// INI Settings //
ini_set(sendmail_from,"[email protected]");	
ini_set(SMTP,"mail.domain.com");
ini_set(smtp_port,"25");

$headers  = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: [email protected]";

$to = $_POST['txtEmail'];
mail($to,"Your Email",$theEmail,$headers);

 

Why am I not allowed to send an email to anyone that doesn't have a "domain.com" at the end of the email?

 

 

Link to comment
https://forums.phpfreaks.com/topic/64543-problems-with-mail/
Share on other sites

btw.. (and this is odd)...

 

I have another page that is in the root of the domain (http://www.domain.com/) and it DOES send an email to the person thats NOT on the domain...

 

this code is in a folder called corpevent (http://www.domain.com/corpevent/) and doesn't work....

Link to comment
https://forums.phpfreaks.com/topic/64543-problems-with-mail/#findComment-321730
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.