altariamx2003
asked on
php mail() send emails but the message is lost
Hi guys
I really need your help with this one.
This is like a continuation from my last question mail() is not working on windows dedicated server with plesk
i got two sites, the first one is pvtcloudlab.com (with windows dedicated server) and grupossc.com (with linux dedicated server).
im trying to send a email with a php script from pvtcloudlab.com to grupossc.com with this example: http://www.pvtcloudlab.com/pruebamailer.php
if you execute the test, looks like that the email was sended but when i enter to the webmail of grupossc.com there is not any email.
I think that the mail was marked as a spam, thats way i went to the webmail from pvtcloudlab.com to create an email to send to grupossc.com and the email was sended without problems.
I went in my linux server (grupossc.com) to check the logs in "/var/log" and there is not errors there.
I really lost on this one, i hope you can give me any advice to know why when i send emails using "php mail() or phpmailer" the email looks like sended but it goes to twightlight zone hahahaha.
best regards
I really need your help with this one.
This is like a continuation from my last question mail() is not working on windows dedicated server with plesk
i got two sites, the first one is pvtcloudlab.com (with windows dedicated server) and grupossc.com (with linux dedicated server).
im trying to send a email with a php script from pvtcloudlab.com to grupossc.com with this example: http://www.pvtcloudlab.com/pruebamailer.php
<?php
ini_set("include_path", "assets/plugins/phpmailer/");
require("PHPMailerAutoload.php");
require("class.phpmailer.php");
$mail = new PHPMailer();
$mail->From = 'sales@pvtcloudlab.com';
$mail->FromName = 'test';
$mail->AddAddress('carlos.alvarez@grupossc.com');
$mail->WordWrap = 50; // set word wrap
$mail->IsHTML(true); // send as HTML
$mail->Subject = "pruebagrupo";
$mail->Body = 'test';
$mail->AltBody = "Riepilogo settimanale dell'impianto: ";
if($mail->Send()){ echo 'sent'; }
else{ echo 'Not sent: <pre>'.print_r(error_get_last(), true).'</pre>'; }
?>
if you execute the test, looks like that the email was sended but when i enter to the webmail of grupossc.com there is not any email.
I think that the mail was marked as a spam, thats way i went to the webmail from pvtcloudlab.com to create an email to send to grupossc.com and the email was sended without problems.
I went in my linux server (grupossc.com) to check the logs in "/var/log" and there is not errors there.
I really lost on this one, i hope you can give me any advice to know why when i send emails using "php mail() or phpmailer" the email looks like sended but it goes to twightlight zone hahahaha.
best regards
ASKER
i think the problem its is not in my windows dedicated server (pvtcloudlab.com), because I can send emails using my script to emails account in hotmail.com or yahoo.com.
I guess my problem is in my linux dedicated server (grupossc.com), because when I try to send emails using my script, the scripts says the email was sended but the email never arrives to grupossc.com.
When i use the webmail on pvtcloudlab.com to send the email the email is sending and it arrives for real, the problem is only when I try to use the script.
Is there a log in linux that i can chek to verify if theres is a problem???
when i use phpmailer o "php mail()" is there an option or something to show me a log or something to veryfy if the email was really send it????
I guess my problem is in my linux dedicated server (grupossc.com), because when I try to send emails using my script, the scripts says the email was sended but the email never arrives to grupossc.com.
When i use the webmail on pvtcloudlab.com to send the email the email is sending and it arrives for real, the problem is only when I try to use the script.
Is there a log in linux that i can chek to verify if theres is a problem???
when i use phpmailer o "php mail()" is there an option or something to show me a log or something to veryfy if the email was really send it????
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I think i got it, the problem is my email server, something is happend there.
Im gonna reinstall it from the scratch
thx a lot bro
Im gonna reinstall it from the scratch
thx a lot bro
look at the php.ini file and see what the configuration of the mail() handler.
What server it should be connecting to transmit the message?
In your example there is no recipient defined...