SQL Server database mail with ASP.net

I am having a problem using SQL Server 2005 database mail from ASP.net (w/ VB.net).

I can run the stored procedure that sends the mail in SQL Server and it works perfect.

However, when I run the same stored procedure in ASP.net the email is not sent.

I obviously am missing something somewhere, any help????
Who is Participating?
bull_riderConnect With a Mentor Commented:
Please follow the below link:


Let me know if you still face this issue.
Its actually the user who is running it from asp.net. His permissions are not set accordingly.
yonbretAuthor Commented:
I was guessing that.

Does it run using the Network Service account, like most ASP.net processes?

What permissions need to be set?
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

yonbretAuthor Commented:
I have discovered one other thing that is helpful to know.

If I run the stored proc using Windows Authentiacation, the email is sent without a problem.

If I run the stored proc using SQL Authentication, the email is not sent.
Could you please mark this question answered then if it did resolve your actual issue?
yonbretAuthor Commented:
The question is not answered.

I need to know why SQL Authentication is not working, but Windows Authentication is working?

What account is used by SQL Authentication? What permissions need to be set for this account on the SMTP server?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.