rick
asked on
Sending Email From SQL Server
To enable someone to send email directly from SQL Server, is adding execute permissions on DatabaseMailUserRole the only step?
Is SMTP enabled on your server and is that server allowed to send it in your domain?
ASKER
>>Is SMTP enabled on your server and is that server allowed to send it in your domain?
Yes
Yes
A better starting question is the destination of sent email.
Sending email is easy.
Having email received (deliverable) is complex.
If you've never done this before, many steps are required + you're best served to start with a service like MailGun.
Sending email is easy.
Having email received (deliverable) is complex.
If you've never done this before, many steps are required + you're best served to start with a service like MailGun.
ASKER
Thanks, David.
But I'm going to stick with my original question for now.
But I'm going to stick with my original question for now.
If SMTP is enabled, then you should be able to send email.
You might try installing SWAKS (perl script) for help debugging problems.
Depending on what MTA you're running, you may have to dig into your mail logs if mail is queued.
SQL Server doesn't really have anything to do with sending mail. This is handled by the MTA running on your system.
Usually software like WordPress or SQL Server or etc... will submit/queue a message into your MTA + then some point in the future, the queue runner will execute, which will actually connect from your sites to other sites, based on other site's DNS MX records.
Maybe you can give an example of code for sending email from SQL Server + likely someone can assist better.
You might try installing SWAKS (perl script) for help debugging problems.
Depending on what MTA you're running, you may have to dig into your mail logs if mail is queued.
SQL Server doesn't really have anything to do with sending mail. This is handled by the MTA running on your system.
Usually software like WordPress or SQL Server or etc... will submit/queue a message into your MTA + then some point in the future, the queue runner will execute, which will actually connect from your sites to other sites, based on other site's DNS MX records.
Maybe you can give an example of code for sending email from SQL Server + likely someone can assist better.
ASKER
What I'm asking is what needs to be done to allow a user to execute this system stored procedure:
sp_send_dbmail
I believe it is just adding the user to the DatabaseMailUserRole role.
That's all I'm trying to confirm. Nothing else.
sp_send_dbmail
I believe it is just adding the user to the DatabaseMailUserRole role.
That's all I'm trying to confirm. Nothing else.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Good resource! thx