Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
getting started with phpmailer
Old 08-09-2009, 10:40 AM getting started with phpmailer
Super Talker

Posts: 134
Trades: 0
hi there,

i downloaded the phpmailer class script but i can't get it to work

i always get the error: cannot connect with the smtp host

any ideas ?
__________________

Please login or register to view this content. Registration is FREE

Check out the Facebook Clone build with Jcow SNS at
Please login or register to view this content. Registration is FREE
, it is free and it always will be
Falcone is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-09-2009, 10:42 AM Re: getting started with phpmailer
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,384
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
specify the SMTP server correctly
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 08-09-2009, 10:56 AM Re: getting started with phpmailer
Super Talker

Posts: 134
Trades: 0
well it seems to work with localhost as smtp server

not with gmail
__________________

Please login or register to view this content. Registration is FREE

Check out the Facebook Clone build with Jcow SNS at
Please login or register to view this content. Registration is FREE
, it is free and it always will be
Falcone is offline
Reply With Quote
View Public Profile
 
Old 08-09-2009, 11:02 AM Re: getting started with phpmailer
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,384
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
That's because Gmail uses a secure SMTP port NOT port 25
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 08-09-2009, 11:05 AM Re: getting started with phpmailer
Super Talker

Posts: 134
Trades: 0
port 465

there is an example script included
__________________

Please login or register to view this content. Registration is FREE

Check out the Facebook Clone build with Jcow SNS at
Please login or register to view this content. Registration is FREE
, it is free and it always will be
Falcone is offline
Reply With Quote
View Public Profile
 
Old 08-09-2009, 11:17 AM Re: getting started with phpmailer
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,384
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
or port 587

Have you tried both of them?
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 08-09-2009, 11:19 AM Re: getting started with phpmailer
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,384
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
AND can you specify authentication and SSL/TLS in the script?
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 08-10-2009, 03:44 AM Re: getting started with phpmailer
Extreme Talker

Posts: 167
Name: Jilesh
Trades: 0
Hi,

If you have installed PHPMailer correctly then use this code and have a check:

<?php
require_once("class.phpmailer.php");
$mail = new PHPMailer();

$mail->IsSMTP(); // send via SMTP
$mail->Host = "mail.yourdomainname"; // SMTP servers
$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Username = "SMTP Email Username"; // SMTP username
$mail->Password = "SMTP Email password"; // SMTP password

$mail->From = "From Email address";
$mail->FromName = "Name to Display";
$mail->AddAddress("Recipient Email address ","Recipient Name");
$mail->AddCC(“CC Email Address”);
$mail->AddBCC(“BCC Email address”);
$mail->AddReplyTo("Reply to email address");

$mail->WordWrap = 50; // set word wrap

$mail->IsHTML(true); // send as HTML

$mail->Subject = "Subject";
$mail->Body = "body";

if(!$mail->Send())
{
echo "Message did not sent <p>";
echo "Mailer Error: " . $mail->ErrorInfo;
exit;
}

echo "Message has been sent";
?>

If this does not work then provide exact error message so that you can get proper assistance.
__________________

Please login or register to view this content. Registration is FREE

ASP.NET 3.5 | SQL 2005 Database | US Based Hosting Company | 24 X 7 Support | Daily Backups
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
thewebhostingdi is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to getting started with phpmailer
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.51248 seconds with 12 queries