Jump to content

[SOLVED] sending a email using php help


jigsawsoul

Recommended Posts

i used this same code before and it seemed to work just fine, but now i don't seem to get sent any email's although it echo's confirmation email sent. any ideas why this happening ?

 

$result = 	"SELECT * FROM events e
			LEFT JOIN artists ON e.artist_id=artists.artist_id
			LEFT JOIN venues ON e.venue_id=venues.venue_id
			LEFT JOIN sales ON e.event_id=sales.event_id
			LEFT JOIN gb_login ON sales.login_id=gb_login.login_id
			LEFT JOIN gb_customers ON gb_login.customer_id=gb_customers.customer_id
			WHERE e.event_id = {$_GET['id']}";

$result = mysql_query( $result ) or die ( mysql_error() );

$row = mysql_fetch_assoc ( $result );

$current_venue = $row['venue'];
$current_artist = $row['artist'];
$current_date = $row['date'];
$current_price = $row['price'];
$user_email = $row['email'];
$user_firstname = $row['firstname'];
$user_surname = $row['surname'];

$subject = "Event Confirmation";

$web = "Gig Bookers";
$msg = "Gig Bookers - This is a confirmation email to say you have purchased $reqtickets Ticket(s) at price $current_price per ticket for $current_artist playing at $current_venue on $current_date. Thank You";

$body = "Sender: " . $user_firstname . " " . $user_surname . "\n\nEmail: " . $email . "\n\nWebsite: " . $web . "\n\nMessage:\n\n" . $msg;

if (mail($email, $subject, $body)) { echo("confirmation email sent"); }
else { echo("confirmation email couldn't send"); }

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.