Jump to content

use smtp with email script


ShaolinF

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

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.