mickeymouse Posted March 3, 2020 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. Link to comment Share on other sites More sharing options...
dsonesuk Posted March 3, 2020 Share Posted March 3, 2020 Wrap \r\n in double quotes. Link to comment Share on other sites More sharing options...
mickeymouse Posted March 4, 2020 Author Share Posted March 4, 2020 Thanks but "\r\n" didn't change the situation. Link to comment Share on other sites More sharing options...
dsonesuk Posted March 4, 2020 Share Posted March 4, 2020 Then I would guess that is not the only problem. Link to comment Share on other sites More sharing options...
mickeymouse Posted March 4, 2020 Author 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. Link to comment Share on other sites More sharing options...
dsonesuk Posted March 4, 2020 Share Posted March 4, 2020 You can test without installing email server using https://toolheap.com/test-mail-server-tool/ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now