IIS and SMTP - SMTP, testing locally

This is Interesting: Free IT Magazines  
Home > Archive > IIS and SMTP > January 2005 > SMTP, testing locally





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author SMTP, testing locally
Laura

2005-01-11, 8:50 pm

After reading through these posts I feel I may be in over-my-head, but here
goes:

I'm using IIS 5.1 on Windows XP Pro, and I'm creating web pages using
DreamWeaver and php and uploading them to my ISP.

I'm able to send mail (using the php mail() function) once the page is
uploaded to my ISP, which is GREAT, but I do most of my testing on my local
computer and I get errors every time I try to send mail. Specifically:

Warning: mail(): SMTP server response: 550 5.7.1 Unable to relay for
laura@thomastwosome.com in c:\inetpub\wwwroot\thomastwosome\addUser
.php on
line 29

line 29 being where I call mail().

Can someone refer me to instructions on setting up localhost to send mail?
Or will this be more trouble than it is worth, since it *is* working on my
production server.

Thanks in advance for any suggestions!
Laura
PS. Here is my code snippet:
$body = "You may now access certain sections of my website!
Your username is {$_POST['username']}. Your password is
{$_POST['password']}.";
mail ($_POST['email'], 'Welcome!', $body, 'From:
laura@thomastwosome.com');


Kristofer Gafvert

2005-01-12, 2:50 am

Hello Laura,

This can happen if you are not allow to relay on your local server. A
reason for this can be that your local SMTP server is configured to
require a username and password, and you are not sending any.

On your ISP's server on the other hand, it allows relaying because they
could have configured it different (for example let a specific IP relay).

So, you can try to allow your IP to relay.

Open IIS Manager.
Right click "Default SMTP Virtual Server" and click Properties.
Click the Access tab.
Click the Relay button.
Make sure that "Only the list below" is selected.
Add your IP to the list (if you have multiple IPs, you might need to add
them all).

You should now be able to relay.
But, this doesn't mean that you will be able to successfully send emails.
There can be other things that prevents you, for example your ISP blocks
port 25, or receiving SMTP servers considers your server to be a
spam-server.

Good Luck!


--
Regards,
Kristofer Gafvert
www.ilopia.com

Laura wrote:

> After reading through these posts I feel I may be in over-my-head, but

here
> goes:
>
> I'm using IIS 5.1 on Windows XP Pro, and I'm creating web pages using
> DreamWeaver and php and uploading them to my ISP.
>
> I'm able to send mail (using the php mail() function) once the page is
> uploaded to my ISP, which is GREAT, but I do most of my testing on my

local
> computer and I get errors every time I try to send mail. Specifically:
>
> Warning: mail(): SMTP server response: 550 5.7.1 Unable to relay for
> laura@thomastwosome.com in c:\inetpub\wwwroot\thomastwosome\addUser
.php

on
> line 29
>
> line 29 being where I call mail().
>
> Can someone refer me to instructions on setting up localhost to send

mail?
> Or will this be more trouble than it is worth, since it is working on my
> production server.
>
> Thanks in advance for any suggestions!
> Laura
> PS. Here is my code snippet:
> $body = "You may now access certain sections of my website!
> Your username is {$_POST['username']}. Your password is
> {$_POST['password']}.";
> mail ($_POST['email'], 'Welcome!', $body, 'From:
> laura@thomastwosome.com');

Laura

2005-01-12, 5:55 pm

Thank you for your help!

I added the IP address for localhost to the relay section and I am now able
to send mail to myself at laura@thomastwosome.com and my husband
jeffrey@thomastwosome.com, but not to anyone else "non-local".

I get:
Warning: mail(): SMTP server response: 503 This mail server requires
authentication when attempting to send to a non-local e-mail address. Please
check your mail client settings or contact your administrator to verify that
the domain or address is defined for this server. in
c:\inetpub\wwwroot\PHPplay\addUser.php on line 29.


Also, (this is embarassing) it *does not* work on my ISP either. I was
testing it sending emails to myself, so it works when sending to another
thomastwosome address, but not to anyone else.

Oh well!

Thanks for your help,
Laura

"Kristofer Gafvert" <kgafvert@NEWSilopia.com> wrote in message
news:xn0dx5vag6xfzw900s@news.microsoft.com...[vbcol=seagreen]
> Hello Laura,
>
> This can happen if you are not allow to relay on your local server. A
> reason for this can be that your local SMTP server is configured to
> require a username and password, and you are not sending any.
>
> On your ISP's server on the other hand, it allows relaying because they
> could have configured it different (for example let a specific IP relay).
>
> So, you can try to allow your IP to relay.
>
> Open IIS Manager.
> Right click "Default SMTP Virtual Server" and click Properties.
> Click the Access tab.
> Click the Relay button.
> Make sure that "Only the list below" is selected.
> Add your IP to the list (if you have multiple IPs, you might need to add
> them all).
>
> You should now be able to relay.
> But, this doesn't mean that you will be able to successfully send emails.
> There can be other things that prevents you, for example your ISP blocks
> port 25, or receiving SMTP servers considers your server to be a
> spam-server.
>
> Good Luck!
>
>
> --
> Regards,
> Kristofer Gafvert
> www.ilopia.com
>
> Laura wrote:
>
> here
> local
> on
> mail?


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com