Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 2nd, 2006, 12:53 AM
Authorized User
 
Join Date: Jun 2006
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to balesh
Default Help Required in Mail / dparsons

Hi all/dparsons

I deployed a project two month back on client machine. Everthing is working fine except the mail. I am forwarding mail to users who are using some of functionality. System is doing all the functionality, but when comes on sendmail() function, it is throwing error. But it was working fine on my machine. Is there any authentication need to be done on client mail server. Please help me.

Thanks in advance.

Lots of expectation from dparsons



 
Old November 2nd, 2006, 02:39 AM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 550
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi

What exactly is the error you are facing, the SMTP server might have changed at your client's end. anyways just let us know the error to investigate further.

Regards
Mike

Fortune favours the brave, so don't regret on missed oppurtunities.
 
Old November 2nd, 2006, 09:48 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

First off, if you are using 1.0 of the framework you can not authenticate yourself at all, in 1.1 MS added the MailMessage.Field property that allows for this.

First I should point out that I have never had to authenticate myself when I send mail using this class BECAUSE the mail server I am sending mail through is internal and I am only delivering an email to an internal address. If, for example, I tried to send an email to my personal Gmail address through that mail server I would also get an error, something to the effect of "This mail server is not an open relay" or simply that the send failed.

You can see the obvious reason why mail servers are setup to prevent this type of thing (spammers heaven).

Anyway, to send authentication to your SMTP server do this:

mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1"); //basic authentication
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "username"); //set your username here
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "password");//set your password here




-------------------------
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.

^^Thats my signature
 
Old November 6th, 2006, 08:18 AM
Authorized User
 
Join Date: Jun 2006
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to balesh
Default

Thanks dparsons,

I sort it out, actually we need to change the physical address in web.config file according to user requirement.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Send mail and attachments with PHP mail function Lofa Beginning PHP 1 June 2nd, 2008 03:24 PM
problems sending mail with java mail gandacuboy J2EE 2 December 20th, 2006 03:05 PM
I am stuck a bit, help friends/dparsons mike_remember ASP.NET 1.0 and 1.1 Professional 3 October 26th, 2006 10:23 AM
Sending both text mail and HTML mail - CDONTS madhukp Classic ASP Basics 1 October 8th, 2003 01:05 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.