mail() :Failed 2 connect 2 mailserver at "localhost" port 25

Swift Mailer is a fantastic library for sending email with php. Discuss this library or ask any questions about it here.

Moderators: Chris Corbyn, General Moderators

Post Reply
User avatar
nehrav
Forum Commoner
Posts: 38
Joined: Sun Sep 20, 2009 6:55 am
Location: New Delhi
Contact:

mail() :Failed 2 connect 2 mailserver at "localhost" port 25

Post by nehrav »

Hi frndz,
I am using wamp and I am trying to send mail from my local machine
Code is running but i get this error on script execution:-

Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\wamp\www\test\mail.php on line 20

I have a lighter idea that its because of smtp settings in .ini file....
but not sure what to edit and where to edit.... :crazy:

Plz suggest me some solution or way to send mail from local machine.
pbs
Forum Contributor
Posts: 230
Joined: Fri Nov 07, 2008 5:31 am
Location: Nashik, India
Contact:

Re: mail() :Failed 2 connect 2 mailserver at "localhost" port 25

Post by pbs »

You need to install mail server to send mails from local machine. You can install IIS and configure it for php to send mail.
User avatar
nehrav
Forum Commoner
Posts: 38
Joined: Sun Sep 20, 2009 6:55 am
Location: New Delhi
Contact:

Re: mail() :Failed 2 connect 2 mailserver at "localhost" port 25

Post by nehrav »

pbs wrote:You need to install mail server to send mails from local machine. You can install IIS and configure it for php to send mail.
I download pegasus 4.51 from net after googling about the same problem.
But haven't done any R & D yet??

can that pegasus work?? :?:
Post Reply