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@gmail.com"; $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 ? Quote 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..! Quote 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 ? Quote 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 ? Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.