views:

585

answers:

2

Hi,

I would like to send e-mail from my own custom webpart using SPUtility (on wss3.0). The issue is that smtp server is on the same host as sharepoint services. SMTP server works and I can send e-mail using telnet. (But it always telling me that message is queued. After all e-mail are reaching theirs destination and they are in my e-mail box.)

I can guess that the issue may be the name op SMTP server which I'm filing in sharepoin configuration. Telnet works when I'm using names: localhost and 127.0.0.1. But sharepoint doesn't accept this names. :(

And when I'm passing to telnet or sharepoint server host name where smtp service is located it dosen't work, and those names accept sharepoint.

Please help me and tell me how can I pass right name of a server to sharepoin configration.

A: 

If the SMTP server is on the same box as your SharePoint site, try 'localhost'. If that doesn't work, try the full name of the server e.g. myserver.mycompany.com (mycompany.com being your local domain).

Previously building a SharePoint site, we separated the SharePoint SMTP Outgoing/Incoming settings with the server name that our code uses. You can stick 'localhost' somewhere accessible from all of your site, such as a web.config setting. Then maintain the configuration going forwards. (I stored this in a maintainable SharePoint list).

If not using the SharePoint SMTP settings be frowned upon, then you'll just have to make it work somehow.

You could check to see a) Whether you can send emails from other parts of the SharePoint b) If not, that this isn't some sort of permissions issue.

Zeb
A: 

The issue was with SMTP configuration. When you open IIS6 configuration of SMTP server, then open server propertis and go to the Access tab, you can see there tow buttons.

1)connection and 2)relay

Just put there your host name and problem is solved. :)

truthseeker