Solved

php mail from localhost IIS server

Posted on 2006-07-12
8
406 Views
Last Modified: 2013-12-13
Hai,

1. I want to send mail from my localhost in php ,i try to using my outlookexpress smtp and email parameters
    but it gives warning like this

Warning: mail() [function.mail]: SMTP server response: 553 Sorry, that domain isn't in my list of allowed rcpthosts. in D:\wamp\www\mail.php on line 9
2. I give the php.iniparameter like this
SMTP = smtpout.secureserver.net ; for Win32 only
smtp_port = 80
sendmail_from= balamurugan@cybersoftdesigns.com ; for Win32 only

3.I think i want to configure IIS SMTPVirtual Server ,How to do this one?

Thanks In Advance
Bala


0
Comment
Question by:gstalin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
8 Comments
 
LVL 22

Expert Comment

by:Ivo Stoykov
ID: 17088469
Hello gstalin,

> smtpout.secureserver.net
SMTP for sure do not listen on port 80 for mail, unless you explicitly configured IIS for that

try port 23 instead

HTH

I
0
 

Author Comment

by:gstalin
ID: 17089409
Hai,
I change my port no to 23 it gives warning msg

Warning: mail() [function.mail]: Failed to connect to mailserver at "smtpout.secureserver.net" port 23, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in D:\wamp\www\mail.php on line 9

I want to send mail from my localhost in php,any one have code or how to do this ?
example is need

Thanks
Bala
0
 
LVL 22

Expert Comment

by:Ivo Stoykov
ID: 17089467
Hi gstalin,

Is you smtp server working?

regards

I
0
Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

 

Author Comment

by:gstalin
ID: 17093467
Hai,
Can u tell how to check it SMTP SERVER working or not in localhost

Regards
Bala
0
 
LVL 24

Expert Comment

by:slyong
ID: 17096751
Hi Bala,

I always think that SMTP is on Port 25 (http://en.wikipedia.org/wiki/SMTP).  However, it seems that your SMTP server does reply you on Port 80 from your first post.  From your localhost, could you try to open a command prompt and do:

C:> telnet smtpout.secureserver.net 80

then the server should say something like "220 smtpout.secureserver.net SMTP..."  (if you don't get 220... jump to the change telnet ... 80 to telnet... 25)
then you type in:

MAIL FROM:<balamurugan@cybersoftdesigns.com>

and tell us whether the mail server say "OK"?
0
 

Author Comment

by:gstalin
ID: 17096791
Hai ,
I test in my localhost command prompt
C:> telnet smtpout.secureserver.net 80
Output is like this
220 smtpout06-04.prod.mesa1secureserver.net ESMTP

I give
MAIL FROM:<balamurugan@cybersoftdesigns.com>
output is like this
250 Sender accepted

Regards
Bala
0
 
LVL 24

Accepted Solution

by:
slyong earned 500 total points
ID: 17096818
Hi Bala (do you know that means bullet in the Philippines language?).. sorry back to the topic,

Ok, try all the commands with the parameters in your PHP (i.e. the mail from and send to, etc, etc).

C:> telnet smtpout.secureserver.net 80

MAIL FROM: <balamurugan@cybersoftdesigns.com>
RCPT TO:<friend@example.com>
DATA
Subject: test message
From: balamurugan@cybersoftdesigns.com
To: friend@example.com

Hello,
This is a test.
Goodbye.
.
bye

the RCPT TO: is the recepient's email (you should use whatever you use in your PHP program).  The second last line with just a . is to end the mail and bye to go back to your C:>.  See if the mail server give you any error.
0
 

Author Comment

by:gstalin
ID: 17097215
Hai,
I use PHPMailer the mail is sent in localhost

Thanks for All Your Help

Bye
Bala
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question