altariamx2003
asked on
mail() is not working on windows dedicated server with plesk
Im trying to send email using mail() function in my server but no matter what i do the mail is not sended and the page dont show me any error.
I made this little example to check whats is happening:
But i still cannot send my mails,
I got a Windows Dedicated Server with Plesk from godaddy, and I know windows sucks but for this project I dont have any alternatives.
This is the configuration of my php: http://pvtcloudlab.com/phpinfo.php
Do I need to change something in my configuration???
Do I miss something else???
Best Regards
Carlos
I made this little example to check whats is happening:
<?php
$msg = "prueba";
$sub = "test";
$head = 'From: sales@pvtcloudlab.com';
if(mail("altaria@hotmail.com", $sub, $msg, $head))
{ print "mail sended"; }
else
{ print "mail not sended"; }
?>
http://pvtcloudlab.com/pruebamail.php"But i still cannot send my mails,
I got a Windows Dedicated Server with Plesk from godaddy, and I know windows sucks but for this project I dont have any alternatives.
This is the configuration of my php: http://pvtcloudlab.com/phpinfo.php
Do I need to change something in my configuration???
Do I miss something else???
Best Regards
Carlos
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You need to know the error
if(!$mail->send()) {
echo 'Message could not be sent.';
echo 'Mailer Error: ' . $mail->ErrorInfo;
} else {
echo 'Message has been sent';
}
ASKER
let me add that code
ASKER
done
It gives me this message: Message could not be sent.Mailer Error: Could not instantiate mail function.
Do you know what does mean?
It gives me this message: Message could not be sent.Mailer Error: Could not instantiate mail function.
Do you know what does mean?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I change your code for this:
and it gives me this message:
--------------------
Array
(
[type] => 2
[message] => 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.
[file] => C:\Inetpub\vhosts\pvtcloud lab.com\ht tpdocs\ass ets\plugin s\phpmaile r\class.ph pmailer.ph p
[line] => 698
)
-----------------
Do you know what is happening????
if($mail->Send())
{ echo 'Sent.<br/>'; }
else
{ echo 'Not sent: <pre>'.print_r(error_get_last(), true).'</pre>'; }
and it gives me this message:
--------------------
Array
(
[type] => 2
[message] => 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.
[file] => C:\Inetpub\vhosts\pvtcloud
[line] => 698
)
-----------------
Do you know what is happening????
Godaddy does not allow you to send email thru external servers. It blocks all of the ports you might use. Run 'phpinfo()' (below) and see what is listed for the SMTP server.
Here's what phpinfo() shows on my older Godaddy Windows server.
<php
phpinfo();
?>
Here's what phpinfo() shows on my older Godaddy Windows server.
sendmail_from noreply@secureserver.net noreply@secureserver.net
sendmail_path no value no value
SMTP relay-hosting.secureserver.net relay-hosting.secureserver.net
smtp_port 25 25
ASKER
Hi Dave this the info that i got from phpinfo http://pvtcloudlab.com/phpinfo.php
sendmail_from gerente@s166-62-103-236.se cureserver .net gerente@s166-62-103-236.se cureserver .net
sendmail_path no value no value
SMTP localhost localhost
smtp_port 25 25
sendmail_from gerente@s166-62-103-236.se
sendmail_path no value no value
SMTP localhost localhost
smtp_port 25 25
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
the problem remains even with altaria@yahoo.com, perhaps as you say guys this a problem with the setup from godaddy, im gonna check on my server if there is something else that i need to change.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thx a lot for your time guys
ASKER
i found the solution by myself
ASKER
The mail is not sended no matter what i do, this is happening just In my windows dedicated server ("f"#$%"#$ck windows by the way").
I try also with my personal mail on gmail.com and also with the domain of my work grupossc.com but no matter with domain do I try the email is not sended.
I try phpmailer with the same result, this a test with phpmailer http://pvtcloudlab.com/pruebamailer.php with the same results
Open in new window