|
|
|
|
![]() ![]() |
Nov 23 2006, 09:47 PM
Post
#1
|
|
|
Newbie [Level 1] ![]() Group: Members Posts: 13 Joined: 22-November 06 Member No.: 33,855 |
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 Trap17.
CODE $email_to = "whoever@whoever.com"; //SEND MAIL TO HERE $subject = "Testing the SMTP server"; $message = "This is a test of the SMTP server on Trap17.com Hosting."; mail($email_to, $subject, $message, 'From: ' . "runexchange@trap17.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. |
|
|
|
Nov 23 2006, 10:19 PM
Post
#2
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 397 Joined: 9-June 06 From: Wisconsin Member No.: 24,924 |
This code is from the login script I am developing for my site. It has been tested.
CODE $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://www.ghostrider.trap17.com/register/register.php?mode=confirm&u=$username&c=$c'>link</a> to register your account.</p> <br><br>If your email client does not support links, you can copy and paste this one: http://www.ghostrider.trap17.com/register/register.php?mode=confirm&u=$username&c=$c <br><br><br><br>If you did not register at www.ghostrider.trap17.com, 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); |
|
|
|
Nov 25 2006, 02:16 PM
Post
#3
|
|
|
Premium Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 181 Joined: 22-February 06 Member No.: 19,007 |
CODE /* 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 |
|
|
|
Mar 25 2008, 07:08 PM
Post
#4
|
|
|
Newbie ![]() Group: Members Posts: 9 Joined: 28-February 08 From: Saudi Arabia Member No.: 58,641 |
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) |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 6th October 2008 - 06:59 PM |