mickeymouse 0 Posted March 3, 2020 Report Share Posted March 3, 2020 I want to send an e-mail. Is this not correct code? The first time I tested it, the e-mail went through. Now it just doesn't go. Do I need to have an e-mail account with my web service provider in order to have my code send an e-mail? $to = $MyEMailaddr; $subject = 'My Website'; $message = $mymsg; $headers = 'UserID & Password' . '\r\n'; mail($to,$subject,$message,$headers); I'm sure $MyEMailaddr contains the correct e-mail address (I have the proof). Same with $Mymsg. Quote Link to post Share on other sites
dsonesuk 913 Posted March 3, 2020 Report Share Posted March 3, 2020 Wrap \r\n in double quotes. Quote Link to post Share on other sites
mickeymouse 0 Posted March 4, 2020 Author Report Share Posted March 4, 2020 Thanks but "\r\n" didn't change the situation. Quote Link to post Share on other sites
dsonesuk 913 Posted March 4, 2020 Report Share Posted March 4, 2020 Then I would guess that is not the only problem. Quote Link to post Share on other sites
mickeymouse 0 Posted March 4, 2020 Author Report Share Posted March 4, 2020 I just found out - it looks like my web service provider is the one that cut off my e-mail service. I will confirm to you later. Quote Link to post Share on other sites
dsonesuk 913 Posted March 4, 2020 Report Share Posted March 4, 2020 You can test without installing email server using https://toolheap.com/test-mail-server-tool/ Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.