View Full Version : phpMailer problems.

August 25th, 2007, 10:24 PM
Does this php file look OK to you?
I tested it a couple of times on my hotmail accounts previously and things seemed to work last week. Then I did some more unsuccessful phpmail testing on those hotmail accounts from a more complicated php file with more classes.
Today not even this simple php file works it just gives me
Mail sending failed
error in Swiftfox do you know why this is happening when things worked last week?


// Include the phpmailer class

// Instantiate it
$mail = new phpmailer();

// Define who the message is from
$mail->From = 'customer-smtp.one.com';
$mail->FromName = 'Vicky';

// Set the subject of the message
$mail->Subject = 'Test Message';

// Add the body of the message
$body='This is a test';
$mail->Body = $body;

// Add a recipient address
$mail->AddAddress('vsuser02@hotmail.com', 'Victoria\'s Secret');

// Send the message
echo ('Mail sending failed');
echo ('Mail sent successfully');

August 26th, 2007, 02:59 PM
Now I remember I could only run this kind of code directly from my Domain by FTP:ing the file to my Webhost account.
You can't test this kind of code on your own LAMP localhost, it just won't work.

[Problem solved]