Solved

php mail from localhost IIS server

Posted on 2006-07-12
8
399 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
  • 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
 

Author Comment

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

Regards
Bala
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

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…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
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 create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now