473,406 Members | 2,220 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

System.Net.Mail Inconsistency...

I am experiencing an inconsistency with System.Net.Mail.

I have a web form on a site. The form gets filled, and one copy gets
sent to the recipient (in**@domain.com). This works just fine.

However, I want a summarized e-mail (with slightly different content) to
get sent to the sender, and this fails unless the “sender”has their
domain name on the same server.

Essentially, it has the following problem:
The SMTP server requires a secure connection or the client was not
authenticated. The server response was: SMTP authentication is required.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Net.Mail.SmtpException: The SMTP server
requires a secure connection or the client was not authenticated. The
server response was: SMTP authentication is required.

Source Error:

Line 40: SmtpClient client = new SmtpClient();
Line 41: client.Send(mail);
Line 42: client.Send(receipt);
Line 43: EmailContent.Text = strContent;
Line 44: EmailSummary.Visible=true;

And yet, the first sending (“mail”, line 41) works, whereas the second
(“recipient” line 42) fails! I Have the web.config fully set up with a
valid SMTP server, and an outgoing username and password, so both
e-mails should be “authenticated” just fine. And yet, thesecond one fails.

web.config:

<system.net>
<mailSettings>
<smtp from="in**@renogoldcorp.com">
<network
host="mail.domain.com"
port="25"
userName="in**@domain.com"
password="########"
defaultCredentials="true" />
</smtp>
</mailSettings>
</system.net>
Why would this work for one e-mail but not the other? The only thing
that I can see, is that the System.Net.Mail actually tries to send via
the domain of the recipient. But this doesn’t make much sense, since a
generic outgoing gateway was set in web.config which should allow me to
send form-collected, script-assembled e-mail to any valid e-mail address
out there. If System.Net.Mail then goes after the domain of the
recipient, why even bother having such a web.config entry in the first
place????

TIA.
...Geshel
--
************************************************** *******************
My return e-mail address is an automatically monitored spam honeypot.
Do not send e-mail there unless you wish to be reported as a spammer.
Please send all e-mail to my first name at my last name dot org, with
a subject-line of “NEWSGROUP REPLY FOR NEO GESHEL” (all uppercase).
************************************************** *******************
Mar 2 '07 #1
0 1533

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Rim | last post by:
Hi, With the great unification of types and classes, what will happen to the following identity inconsistency? >>> class myint(int): pass .... >>> a=int(1); b=int(1) >>> a is b 1
15
by: Roberto A. F. De Almeida | last post by:
I found that when using negative indices, the slice object passed to __getitem__ depends on the number of slices. An example to clarify: class a: def __getitem__(self, index): return index ...
46
by: Scott Chapman | last post by:
There seems to be an inconsistency here: Python 2.3.2 (#1, Oct 3 2003, 19:04:58) on linux2 >>> 1 == True True >>> 3 == True False >>> if 1: print "true" ....
2
by: Peter Clifton | last post by:
Hello all, I am very new to this subject and learning by example. I have a small inconsistency in an XML file when transformed using different processors. I was wondering if someone could shed...
4
by: Trond A. S. Andersen | last post by:
Hi, all! I'm trying to use the System.Web.Mail. "package" combinded with System.Web.Mail.SmtpMail in order to send MS Excel spreadsheets attached to mail messages. However, sending one single...
5
by: martin | last post by:
Hi, I have created a class that is totally seperate from my web application. However this class is used extensivly by the web application for stuff like data access. I wish to add a function to...
9
by: JJ | last post by:
Do you all use HTML help workshop to create your help system. I am finding it quite clumsy to use. Mayeb because I am not used to using it. Do any of you use any other techniques to create help...
2
by: clevrmnkey | last post by:
I've had nothing but trouble from the System.Net.Mail objects, but I finally need to make them work, and I can't for the life of me see what I'm doing wrong. I pared back my mail transaction to...
4
by: Laurence Breeze | last post by:
I wonder if anyone can help ... Today I tried to create another non-clustered index on a table. This failed as I apparently already had 249 non-clustered indexex on the table. Looking at the...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.