April 7, 2010 at 1:20 am
Hi People. I am developing for a client's SQL 2005 Standard Edition and he urgently needs Database Mail for mass mail-outs of Maintenance Work Requests.
Client is pressing to go live with this and I'm trying to meet his expectations, but very little time for testing when I do get it going.
I have looked at the available Help Files but some Items are not so well explained.
I tried creating a Profile and stubbed my toe on whether to use
(a) Windows Authentication (seems right to me) or
(b) "Anonymous"
What's the difference?
Also, what email addresses to specify? I have one to use as the sender, but wonder if the same one should be used for sending AND receiving emails.
Also, SQL Notes say it won't work unless DatabaseMailUserRoles exist. Is that correct?
Does it depend on selection (a) or (b) above?
According to SQL Notes, the following will add a DBMUR member: -
EXEC sp_addrolemember @Rolename = 'DatabaseMailUserRole',
@membername= '<database user>'
But what should I use for a name? Is there a convention to follow on this?
The client's staff members all have Email Names. Is that what to use?
This is very unfamiliar territory, and I am up against it here. Any ideas folks?
(I am fine with writing the SPROCs to use Database Mail, but setting up for it and going "Live" straight away is hard.)
Regards,
Lester Vincent 🙂 🙂
Sydney
April 7, 2010 at 2:08 pm
(a) Windows Authentication (seems right to me) or
(b) "Anonymous"
What's the difference
>> This is while setting the mail accounts. This is asked to check if your SMTP requires authentication to be done before sending emails. Generally it is set to be anonymous considering the nature of SMTP protocol.
You can ask the exchange admin to create a special account for SQL Server's DBMail.
I am not sure about the question on DatabaseMailUserRoles. Please note that once you setup DBMail fine, you can then plan on adding users who can send mails using DBMail.
April 8, 2010 at 12:07 am
Thanks for replying, mangeshd. Since my post, I have been reading everything I could find on Database Mail, and decided to try it out.
I learned that if I went into the Database Mail Configuration Manager, and
(a) created a Profile and set it to "Public" (not Private) and Default=1 (=True), I would not need to somehow obtain membership of the "DatabaseMailUserRole".
(b) created an email account and specified its two email addresses (not sure what they are called now),
that I could send an email with file attachments, etc via the system sproc,
msdb.dbo.sp_send_dbmail.
I tried all of that on my developer edition, but unfortunately, even though it displayed that the email was "queued", (sounds as though it was going to work) it didn't work. :w00t:
I checking my mail event log (ie SELECT * FROM msdb.dbo.sysmail_event_log) and it showed the following error message:
"The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2010-04-07T20:27:13). Exception Message: Cannot send mails to mail server. (Unable to send to all recipients.). )"
So now, I wonder if anyone knows what I did wrong. (I suspect the problem is in the email addresses I included in the email account, but I cannot get into these to view and change them now. I could probably delete the email account and create another, but I need to know what should be done to fix it first.
Any ideas folks?
Lester Vincent
Sydney
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply