Solved

php mail from localhost IIS server

Posted on 2006-07-12
8
400 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Having trouble setting Apache to recognise 2 vitual sites (on different drive). 3 60
phpmyadmin 3 33
WordPress syntax 2 27
Sql query on a varchar that is numeric. 8 27
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…
This article discusses four methods for overlaying images in a container on a web page
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to count occurrences of each item in an array.

895 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

15 Experts available now in Live!

Get 1:1 Help Now