Jump to content
xisto Community
Sign in to follow this  
runeco

Genuine Help With Smtp And Php Mail() Function I need help using the PHP mail() function and the SMTP server on Trap1

Recommended Posts

Hello, I have looked up the solution to this problem numerous times on this forum but cannot seem to get a straight answer. I have also read that something called SMTP Authetication is required. I have looked up numerous ways this should be done, but I believe it required special protocols. This is the code that I tried to use to send e-mail using the SMTP server here at Xisto.

$email_to = "whoever@whoever.com"; //SEND MAIL TO HERE$subject = "Testing the SMTP server";$message = "This is a test of the SMTP server on Xisto.com Hosting.";mail($email_to, $subject, $message, 'From: ' . "runexchange@Xisto.com" . "\r\n");

No error occurs, but it does not send the message to the indicated mailbox. If anybody knows what I am doing wrong I would GREATLY appreciate am explanation on how to use the SMTP here. Even if you can just display a working code snippet of a mail() function this would help me GREATLY.

Thank You, please conside that I have tried very hard to find the solution on this forum as well as on the internet.

Share this post


Link to post
Share on other sites

This code is from the login script I am developing for my site. It has been tested.

$to = $_POST['email'];$subject = "Please confirm your account.";$message = "<html><head><title>Please confirm your account</title></head><body bgcolor=black><font color=blue face='verdana' size=4><b>Thank you for registering!</b><br><p>Please click this <a href='http://forums.xisto.com/no_longer_exists/; to register your account.</p><br><br>If your email client does not support links, you can copy and paste this one:http://forums.xisto.com/no_longer_exists/ you did not register at http://forums.xisto.com/no_longer_exists/, someone else used your e-mail address.  Do not worry, with out this e-mail they cannot activate their account and utilize this site.";$headers  = 'MIME-Version: 1.0' . "\r\n";$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";$headers .= 'From: Registration (noreply) <noreply@ghostrider.trap17.com>';mail($to, $subject, $message, $headers);

Share this post


Link to post
Share on other sites
/* recipients */$to  = "Mary <mary@example.com>" . ", "; //note the comma$to .= "Kelly <kelly@example.com>";/* subject */$subject = "Birthday Reminders for August";/* message */$message = '<html><head> <title>Birthday Reminders for August</title></head><body><p>Here are the birthdays upcoming in August!</p><table> <tr>  <th>Person</th><th>Day</th><th>Month</th><th>Year</th> </tr> <tr>  <td>Joe</td><td>3rd</td><td>August</td><td>1970</td> </tr> <tr>  <td>Sally</td><td>17th</td><td>August</td><td>1973</td> </tr></table></body></html>';/* To send HTML mail, you can set the Content-type header. */$headers  = "MIME-Version: 1.0\r\n";$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";/* additional headers */$headers .= "From: Birthday Reminder <birthday@example.com>\r\n";$headers .= "Cc: birthdayarchive@example.com\r\n";$headers .= "Bcc: birthdaycheck@example.com\r\n";/* and now mail it */mail($to, $subject, $message, $headers);

you can use the example above to test and send mail , hope this helps

Share this post


Link to post
Share on other sites

I M SORRY BUT REALY I WANT TO ASK YOU A QUESION

 

IT IS IMPORTANT TO ME AND I COULD NOT MAKE A NEW TOPIC I WAS NOT ALLOWED TO DO SOME

 

SO MY QUESTION HOPING THAT NOT TO BOTHER YOU

 

 

 

HOW DO YOU WRITE JOWAN

 

IS IT LIKE THIS OR WRONG BEC I WANT TO WRITE THE CORRECT SPELLING IN THE PASA PORT

 

WITH ALL MY THANKS TO YOU ALL

(list)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.