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?
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

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?
All Courses

From novice to tech pro — start learning today.