Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Genuine Help With Smtp And Php Mail() Function, I need help using the PHP mail() function and the SMTP server on Trap1
runeco
post 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.
Go to the top of the page
 
+Quote Post
ghostrider
post 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);
Go to the top of the page
 
+Quote Post
midnitesun
post 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
Go to the top of the page
 
+Quote Post
SHERY
post 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)

Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Who Thinks Trap 17 Is Th Best Server?(9)
  2. Wow Private Server(3)
  3. Connection Error 800a0e7a On Win Server 2003 X64(1)
  4. How to setup DNS server in Linux Slackware(5)
  5. How To Create Embed Image Mail In Gmail(56)
  6. how to make a pc server?(30)
  7. How To Make A Counter Strike 1.6 Dedicated Server(17)
  8. Runescape Private Server(76)
  9. Are You Haveing Bad Experience With Yahoo Mail?(4)
  10. Tutorial Build Your Own Cs Server 1.6 Steam(16)
  11. Php Functions To Send Mail(9)
  12. Recommended Server-side Programming Language(7)
  13. Tutorial On How To Compile Your Own Mangos World Of Warcraft Private Server.(3)
  14. I Have Install Windows 2003 Server(5)
  15. How To Make Your Own Counter Strike Source Dedicated Server!(38)
  1. A Web Server On Lan(9)
  2. PHP Function To Add Previous and Next Page Feature(5)
  3. Which Mail For My Website?(9)
  4. Private Server(1)
  5. How To Install Sql Server Express In Package Deployment With Different Instance Name(0)
  6. Rsps Hosting?(0)
  7. Print Server Help(0)
  8. A Question About Php Mail(1)
  9. Disabling Right Click Function(9)
  10. Private Servers(16)
  11. Dohwow(2)
  12. The Other Hdd Does Not Appear On My Server(2)
  13. Help With Compiling My Server(0)


 



- Lo-Fi Version Time is now: 6th October 2008 - 06:59 PM