• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 640
  • Last Modified:

What are the correct email credentials to send emails using ASP.NET web.mail to my companies distribution lists

I have a ASP.NET web application that sends emails to my companies distribution lists. To prevent spamming the distribution lists have been changed to accept emails from authenticated users only, now the emails are being send and users are notified by with an email containing a message that they do not have permission to send to the distribution list. I have put in the code to logon as my authenticated user, impersonate that user, and send the email (with the credentials of the of my authenticated user. It works on my local machine but when I publish to the server, the emails are not sent (with the same message/ no permission).  Is there a way of making to make this work using authentication and impersonation? I have googled and tried different settings, but it is not working for me.
0
Jazz010
Asked:
Jazz010
  • 5
  • 3
1 Solution
 
Jazz010Author Commented:
That should have said that "emails are not being sent to the distribution list"
0
 
oobaylyCommented:
Can you show the code you are using to configure the SmptClient? Are the credentials for the user being impersonated on the server identical to those of the user on your development machine?
0
 
Jazz010Author Commented:
I will get the code from work. Yes the credentials are the same, I thought that may be the problem so  I assigned the "my authenticated user" name, password and domain to variables and use those for both the logon/impersonation and credentials for email. It works on my local host, is there something more that is checked that it is coming from the web server that I have to ensure is "authenticated" or accepted by the email server that it is from an "authenticated user". Thanks.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
Jazz010Author Commented:
The code is in the attached file.

public-void-SendEmail.doc
0
 
Jazz010Author Commented:
I think this should work and I don't have to jump through hoops. Before assigning to my TO: of the email ,find all the members of the distribution list from Active Directory (because I should be able to do that, right) and assign the individual emails as a string in the TO: As their email accounts do not  have "Authenticated Users Only" checked, they should recieve emails.                                                      Still, it would be nice to know why I couldn't authenticate. Comments????
0
 
oobaylyCommented:
I'm afraid I'm not going to be of much use as I've never really had to use Exchange.

Since .Net 2.x, I've used the System.Net.Mail namespace, which contains the SmtpClient object and set credentials on a connection basis to authenticate.
http://www.systemnetmail.com/
0
 
Jazz010Author Commented:
Thanks for all the time you spend on my problem, much appreciated! I am guessing too that the web.mail may have been the downfall. But, I was able to send the emails after going to Active Directory and getting the individual email addresses of the members in the distribution list, and not using any authentication. Thanks again.
0
 
oobaylyCommented:
Thanks for the points, I'm not sure I was that much help
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now