ShaolinF Posted October 16, 2007 Share Posted October 16, 2007 Hi Guys, I want to use SMTP with the following email script: <?php ob_start(); session_start(); //process the post variables... $to = "[email protected]"; $name = $_SESSION['NAME']; $email_addr = $_SESSION['EMAILADD']; $gender = $_SESSION['GENDER']; $subject = "Event Tickets"; $phone = $_SESSION['CONTACTNO']; //$msg = $_POST["msg"]; // Construct the message.... $mail = "Hello $name,\n\nThank your for your ticket(s) purchase.\nWe look forward to see you.\n\n"; $mail .= "Here is the information you have given us:\n\n"; $mail .= "Name: ".$name."\n"; $mail .= "Gender: ".$gender."\n"; $mail .= "Email Address: ".$email_addr."\n"; $mail .= "Phone: ".$phone."\n\n"; $mail .= "Subject: ".$subject."\n"; //$mail .= "Your Message:\n".$msg."\n\n\n"; $mail .= "Best Regards,\nUW\n\n"; // If any lines are larger than 70 characters, we will use wordwrap() $message = wordwrap($message, 70); // Send the email... mail($email_addr, $subject, $mail, "From: admin@".$_SESSION['APP_SERVER']."\r\n"); mail ($to, $subject, $message, "From: ".$email_addr."\r\n") $mail = str_replace("\n", "<br>", $mail); ?> What adjustments do I need to make ? Link to comment https://forums.phpfreaks.com/topic/73542-use-smtp-with-email-script/ Share on other sites More sharing options...
MadTechie Posted October 16, 2007 Share Posted October 16, 2007 it will use whatever your php.ini has been set to.. also mail uses SMTP..! Link to comment https://forums.phpfreaks.com/topic/73542-use-smtp-with-email-script/#findComment-371066 Share on other sites More sharing options...
ShaolinF Posted October 17, 2007 Author Share Posted October 17, 2007 ??? You lost me - All I want to do is use SMTP. What will I need to do to the code above inorder to achieve this ? Link to comment https://forums.phpfreaks.com/topic/73542-use-smtp-with-email-script/#findComment-371291 Share on other sites More sharing options...
MadTechie Posted October 17, 2007 Share Posted October 17, 2007 Okay.. i'll try to explain.. their different types of email services.. but buy default PHP uses SMTP... so you don't need to change anything.. whats the problem.. why do you think you need to change it ? Link to comment https://forums.phpfreaks.com/topic/73542-use-smtp-with-email-script/#findComment-371529 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.