I am trying to use phpMailer with smtp:
Code: [Select]$mailer = new PHPMailer();
$mailer->IsSMTP();
$mailer->Mailer = "smtp";
$mailer->SMTPSecure = 'tls';
$mailer->Host = 'smtp.orangehome.co.uk';
$mailer->Port = 25;
$mailer->SMTPAuth = false;
$mailer->Username = 'mail@domain.com';
$mailer->Password = 'password';
$mailer->From = 'mail@domain.com';
$mailer->FromName = 'Me';
$mailer->Body = 'This is the main body of the email';
$mailer->Subject = 'This is the subject of the email';
$mailer->AddAddress('you@domain.com');
if(!$mailer->Send())
{
echo "Message was not sent<br/ >";
echo "Mailer Error: " . $mailer->ErrorInfo;
}
else
{
echo "Message has been sent";
}
I have also tried with googlemail:
Code: [Select]$mailer = new PHPMailer();
$mailer->IsSMTP();
$mailer->Mailer = "smtp";
$mailer->SMTPSecure = 'ssl';
$mailer->Host = 'smtp.gmail.com';
$mailer->Port = 465;
$mailer->SMTPAuth = TRUE;
$mailer->Username = 'mail@domain.com';
$mailer->Password = 'password';
$mailer->From = 'mail@domain.com';
$mailer->FromName = 'Me';
$mailer->Body = 'This is the main body of the email';
$mailer->Subject = 'This is the subject of the email';
$mailer->AddAddress('you@domain.com');
if(!$mailer->Send())
{
echo "Message was not sent<br/ >";
echo "Mailer Error: " . $mailer->ErrorInfo;
}
else
{
echo "Message has been sent";
}
but I get this error message:
Warning: fsockopen() [function.fsockopen]: unable to connect to smtp.orangehome.co.uk:25 (Connection timed out) ...
or the equivalent for gmail
Is there something I'm missing?
PHP Version 5.2.6
PHPMailer - PHP email class Version: 2.3
textfield unchanged
hi,i want my form to know whether its textbox is unchange or not.if($textbox == 'unchanged'){ //do this}else{ //do this}ive been searching all day , but cant find the exact solutions...
News script
Hi ...I am not sure if this is the rite place to post this but if its not sorry i am new here and need help with my cricket scores script now the code works well i just cant get the next or prev to
How to get all server headers like Live http Headers does
Hey all, like many of you I use the Firefox addon "Live http Headers". I'm trying to write a tool that will basically do the same thing, but web-based... so the user would enter a URL and
Simultaneous select/update/insert
HiHow would I need to go about when 2 users update a single row simultaneous? And how would I need to go about when 2 users want to edit a row?Should I first lock the table, update the row to indicate
Problem with Sending Mail by PHP
hello all, I m new to php, can u plz provide me the code to send mail by php having CAPTCHA code in the form.i m using the following code :career.phpLine number On/Off | Expand/Contract
remove trailing slash from array
I have the following array which contains trailing slashes I need to remove. What is the best way to accomplish this?Array ( [Field1] => A [Field2] => Test [Field3] =>
Must-Know Topics of PHP
Can you guys list the must-know topics of PHP. I am still a learner and I am trying to cover most of the important topics in PHP.
login and redirect
hello! can someone help me.. can you give me an idea.. I want to make a login page and redirects it to different web page depending on the username and password used in logging in... thanks!
utf8_general_ci error ??
I have all kinds of data to be inserted in database table//I am getting this errorYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right
dropdown box help - open php files to textarea
Hi, I am using tinymce to edit content located in several php files. The code I attached works but is missing some functionality and I am very new at php so I need some help or advise please.What I