473,406 Members | 2,633 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

PHP -Mail problem

Hi ,

I am using WAMP for my php application.My problem is that I can't send mail using php mail() function . I am not configured SMTP.How can I configure SMTP? which SMTP server can I use for this?

Thanks & Regards,

Roshin
Jul 29 '08 #1
7 7459
It should work. You could try to connect to a SMTP server using telnet on port 25 and see at least if you can connect. It may be that your ISP is blocking outgoing connections on port 25 to prevent spamming, you should also contact them to find out. If port 25 is open, please get back to us with an example of how you've called the mail() function.

Regards,
Tom
Jul 29 '08 #2
It should work. You could try to connect to a SMTP server using telnet on port 25 and see at least if you can connect. It may be that your ISP is blocking outgoing connections on port 25 to prevent spamming, you should also contact them to find out. If port 25 is open, please get back to us with an example of how you've called the mail() function.

Regards,
Tom
How can i configure SMTP using GMail? I am using WAMP in my local machine?
Jul 29 '08 #3
henryrhenryr
103 100+
try phpmailer:

http://sourceforge.net/projects/phpmailer

When you download it, look in the examples and there is one for gmail. It doesn't require any changes to your php setup, just setup the script correctly as in the example...
Jul 29 '08 #4
I have just installed the WAMP in my local machine.Can you give the details of configuring smtp using Gmail in php.ini. should I install phpmailer class?Is there any other way to send mail using smtp?
Jul 30 '08 #5
henryrhenryr
103 100+
I have just installed the WAMP in my local machine.Can you give the details of configuring smtp using Gmail in php.ini. should I install phpmailer class?Is there any other way to send mail using smtp?
I found that phpmailer was the easiest solution. I attempted to setup the SMTP in php and found it wouldn't quite work but I got phpmailer working in about 5 minutes.

Another method I did try in Windows was to use blat with stunnel and then use exec() to send the blat command to your computer. You can google blat and stunnel - both free software.

Unless you have a specific reason not to try phpmailer, I really would give it a go - it is just easier...
Jul 30 '08 #6
I used the phpmailer

But got this error
Warning: fsockopen() [function.fsockopen]: unable to connect to ssl://smtp.gmail.com:465 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) in E:\wamp\www\phpmailer\class.smtp.php on line 122
Mailer Error: Language string failed to load: connect_host
Jul 30 '08 #7
henryrhenryr
103 100+
Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?
Hi Roshin

Sorry it wasn't as easy as I suggested! You can fix it, as the error says, by enabling ssl. I didn't realise WAMP doesn't enable by default...

Quick Instructions:
open php.ini
uncomment line ";extension=php_openssl.dll"
restart WAMP

Verbose...
- you should find a link to php.ini if you left click on the WAMP icon in the taskbar
- look for "config files" click on php.ini.
- ctrl+f and find "openssl"
- hopefully the following line is there: ";extension=php_openssl.dll"
- remove the ";"
- save php.ini
- left click on WAMP icon in taskbar again
- select restart all services
- test you phpmailer again

Tested OK on WAMP5 1.7.2

Hope this works for you!
Jul 31 '08 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Bruce W...1 | last post by:
In my effort to learn PHP I'm playing with some simple email scripts. They worked a few days ago but they stopped working. The only thing I've done to this Windows 2000 PC in this time was a...
6
by: Mike the Canadian | last post by:
I am having a very strange problem sending email with php. I have two domains. I can send an email to one domain using php but not the other. If I put both email addresses in the mail command only...
4
by: Shawn Zheng | last post by:
I have a problem with SmtpMail.Send. the message sent by SmtpMail.Send stuck in Inetpub\mailroot\Queue folder could not be sent out. The SMTP server is in Windows 2000 server. the code that I used...
6
by: chris | last post by:
My code <?php $name = "freddie"; $message.="Hi Joe,\n"; $message.="\t $name has Filled out the form on the Website,\n"; $message.="The information from the form is listed below:\n";...
2
by: Tim | last post by:
I am trying to send a simple mail message using windows forms in VB.NET 2005. When executing the code, I get a general 'Configuration system failed to initialize' error message when the code...
2
by: Mitul | last post by:
Hello Friend, I am having very strange problem with mail function. As I have to implement Newsletter things in my hebrew site. I have implemented everything but having problem with subject line...
3
rsrinivasan
by: rsrinivasan | last post by:
Hi, When i run the below program to send mail, I hava an error msg like this. What is the problem? javax.mail.SendFailedException: Invalid Addresses; nested exception is: class...
0
by: Emmanuel Petit | last post by:
I apologise in advance for my little knowledges in php. I use PHP 5.2.1 Here is an extract of the script which causes me problems. //email of recipient $ea='mister@somesite.com'; //tracking...
1
by: the_ricka | last post by:
Hi all, I'm fairly new to python, but very excited about it's potential. I'm trying to write a simple program that will accept input from a command line and send email. The parameters I used on...
1
by: =?Utf-8?B?VGltb3RoeQ==?= | last post by:
Hi all, who can help me , recently i found a problem from the window mail whic are i am using my own personal mail account and try to using window mail to log in. anywhre i can receive some of...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.