PHP mail function - not sending emails

Status
Not open for further replies.

hortacristian21

New Member
Messages
3
Reaction score
0
Points
0
Hello,

I just moved my website to x10 free hosting. I created a php form and seems like the php "mail" function is not working. here is an example of my code

PHP:
$subject = "subject\n"; 
	
	$message = "
	
	Name: $name\n
	
	
	Rsvp: $rsvp\n";
	
	
	$from = "From: My Name<myemail@gmail.com>\r\n";
	
	mail("myemail@gmail.com", $subject, $message, $from);

I've been reading through the forum and some people find the email on their spam folder but I don't think I have the same case here. Thanks for your help.
 

stpvoice

Community Support Rep
Community Support
Messages
5,987
Reaction score
212
Points
63
Hello,

The from address you use must match an address that is created in your cPanel. Other addresses will not work.

Thanks.
 
Status
Not open for further replies.
Top