i can't send email with php sendmail function

Status
Not open for further replies.

listysite76

New Member
Messages
28
Reaction score
0
Points
0
PHP:
			 $to = "$email1";
										 
    $from = 'lislia';
    $subject = 'Complete Your Registration';
    //Begin HTML Email Message
    $message = "Hi $yourname,

   Complete this step to activate your login identity at $dyn_www

   Click the line below to activate when ready

  // http://$dyn_www/activation.php?id=$id&sequence=$db_password
   If the URL above is not an active link, please copy and paste it into your browser address bar

   Login after successful activation using your:  
   //E-mail Address: $email1 
  // Password: $pass1

   See you on the site!";
   //end of message
	$headers  = "From: $from\r\n";
    $headers .= "Content-type: text\r\n";

    mail($to, $subject, $message, $headers);
i have a free hosting account.i want to sent email with php but email function is is not working.what's the problem?
 
Last edited:

stpvoice

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

What domain are you trying to send messages to?
Also, try $headers .= 'Content-type: text/plain; charset=iso-8859-1' . "\r\n"; instead of the current content type line you have under $headers.
 
Last edited:

stpvoice

Community Support Rep
Community Support
Messages
5,987
Reaction score
212
Points
63
No reason why you can't change it.
Please answer the question. I can't help you unless you co-operate.
 
Last edited:

listysite76

New Member
Messages
28
Reaction score
0
Points
0
i can't change it because email is given by user.it is not a fixed address which i am trying to send email.i added that little script too but still not working
 
Last edited:

stpvoice

Community Support Rep
Community Support
Messages
5,987
Reaction score
212
Points
63
What about changing the line of code I asked you to?
 

listysite76

New Member
Messages
28
Reaction score
0
Points
0
i 've done it , but still not working

---------- Post added at 12:53 PM ---------- Previous post was at 12:51 PM ----------
 
Last edited:

stpvoice

Community Support Rep
Community Support
Messages
5,987
Reaction score
212
Points
63
Did you check the spam/junk email folders?
 
Last edited:

listysite76

New Member
Messages
28
Reaction score
0
Points
0
yes checked in junked folders and tried sending mail to my all ,Gmail,yahoo and hotmail accounts............but still e mail is not working
 
Last edited:

stpvoice

Community Support Rep
Community Support
Messages
5,987
Reaction score
212
Points
63
listysite76 said:
????????????????????????

It's a simple question.
Did you check the spam/junk email folders at the recipient's email account?
 
Last edited:

listysite76

New Member
Messages
28
Reaction score
0
Points
0
recipient's email address is my email address,(i used my hotmail account check it)and yes i checked

---------- Post added at 01:14 PM ---------- Previous post was at 01:11 PM ----------

thanks, i got a email right now... it is working now
 
Status
Not open for further replies.
Top