Database mail configuration

  • Hi guys, I set up my db mail and sending email like nobody's business but can't seem to get the sent messages in my sent items although there is a setting for that in sql agent's properties. Has anyone done this and got it right? If yes, then please let me know.

    :-PManie Verster
    Developer
    Johannesburg
    South Africa

    I can do all things through Christ who strengthens me. - Holy Bible
    I am a man of fixed and unbending principles, the first of which is to be flexible at all times. - Everett Mckinley Dirkson (Well, I am trying. - Manie Verster)

  • Manie the key is the specific error messages you see in msdb.sysmail_faileditems.

    take a look at the data from this SELECT statement:

    are all the err.[description], basically the same? what is the specific message that repeats over and over? that will tell us if you have a firewall issue, wron server info, login failure, or whatever the error is.

    SELECT

    err.[description],

    fail.*

    FROM [msdb].[dbo].[sysmail_event_log] err

    inner join [msdb].[dbo].[sysmail_faileditems] fail

    ON err.mailitem_id = fail.mailitem_id

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • I might be wrong, but I thought that option was for SQL Mail and not DB Mail so therefore shouldn't be in 2012 as SQL Mail is depreciated.

    There where exceptions with the extendend MAPI extensions where it wouldnt save the sent item in the sent items folder in 2008, so you had to add in the @copy_recipients parameter and set a rule up on the mail box to move it into the sent items folder.

  • Lowell (6/1/2012)


    Manie the key is the specific error messages you see in msdb.sysmail_faileditems.

    take a look at the data from this SELECT statement:

    are all the err.[description], basically the same? what is the specific message that repeats over and over? that will tell us if you have a firewall issue, wron server info, login failure, or whatever the error is.

    SELECT

    err.[description],

    fail.*

    FROM [msdb].[dbo].[sysmail_event_log] err

    inner join [msdb].[dbo].[sysmail_faileditems] fail

    ON err.mailitem_id = fail.mailitem_id

    Thank you Lowell, I'll check this out. I do not have failures for now though it is just that the mail is not copied to the sent items folder. This will however help a lot and I will definitely check this out.

    :-PManie Verster
    Developer
    Johannesburg
    South Africa

    I can do all things through Christ who strengthens me. - Holy Bible
    I am a man of fixed and unbending principles, the first of which is to be flexible at all times. - Everett Mckinley Dirkson (Well, I am trying. - Manie Verster)

  • anthony.green (6/1/2012)


    I might be wrong, but I thought that option was for SQL Mail and not DB Mail so therefore shouldn't be in 2012 as SQL Mail is depreciated.

    There where exceptions with the extendend MAPI extensions where it wouldnt save the sent item in the sent items folder in 2008, so you had to add in the @copy_recipients parameter and set a rule up on the mail box to move it into the sent items folder.

    Anthony, if you go into SQL Agent's properties you will definitely see it there and I also read that it should work for DB Mail.

    :-PManie Verster
    Developer
    Johannesburg
    South Africa

    I can do all things through Christ who strengthens me. - Holy Bible
    I am a man of fixed and unbending principles, the first of which is to be flexible at all times. - Everett Mckinley Dirkson (Well, I am trying. - Manie Verster)

  • This msdn link has detailed troubleshooting steps for different scenarios, hope this helps.

    Troubleshooting dbmail

    M&M

  • I read your question completely wrong. Manie; Anthony read it correctly.

    offhand, getting it in might be difficult; it's just like sending a mail from home versus sending it at work; i think its stored locally.

    I'm thinking that depending on your application of choice you might want to export the files to text as .eml files, so they can be drag and dropped into your applications Sent Mail folders; the little bit of research i did did not show me anything easier than that, but that ends up being a semi manual process to get it in;

    For everything int he future, i think bcc-ing the message to yourself, with a rule to put it in the sent folder would probably be the route i would go instead, except for a one time import as described above for eprevious messages.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Manie Verster (6/1/2012)


    anthony.green (6/1/2012)


    I might be wrong, but I thought that option was for SQL Mail and not DB Mail so therefore shouldn't be in 2012 as SQL Mail is depreciated.

    There where exceptions with the extendend MAPI extensions where it wouldnt save the sent item in the sent items folder in 2008, so you had to add in the @copy_recipients parameter and set a rule up on the mail box to move it into the sent items folder.

    Anthony, if you go into SQL Agent's properties you will definitely see it there and I also read that it should work for DB Mail.

    Manie

    I'm not disputing that the option is there, what I'm disputing is should that option be there, everything I have read on this option seems to relate to MAPI and as DBMail is SMTP, I belive it is something which should of been removed from the GUI.

    But as you say you have read documentation to make this work, I would appreciate it if you could provide the links so I can take a look through, as the only option would be to CC yourself and create rules to move it to the right folders.

  • anthony.green (6/6/2012)


    Manie Verster (6/1/2012)


    anthony.green (6/1/2012)


    I might be wrong, but I thought that option was for SQL Mail and not DB Mail so therefore shouldn't be in 2012 as SQL Mail is depreciated.

    There where exceptions with the extendend MAPI extensions where it wouldnt save the sent item in the sent items folder in 2008, so you had to add in the @copy_recipients parameter and set a rule up on the mail box to move it into the sent items folder.

    Anthony, if you go into SQL Agent's properties you will definitely see it there and I also read that it should work for DB Mail.

    Manie

    I'm not disputing that the option is there, what I'm disputing is should that option be there, everything I have read on this option seems to relate to MAPI and as DBMail is SMTP, I belive it is something which should of been removed from the GUI.

    But as you say you have read documentation to make this work, I would appreciate it if you could provide the links so I can take a look through, as the only option would be to CC yourself and create rules to move it to the right folders.

    Anthony, I repeat.....

    .......and I also read that it should work for DB Mail.

    ..and you are right that although the option is there but it might not work with SMTP. Unfortunately, I did not keep record of my readings I cannot post it here but have also come to the realisation that it is a waste of time and I am absolutely already using the way you suggested with the CC and rule.

    My new problem now is that I am not getting any e-mails out through database mail to external e-mail addresses.

    :-PManie Verster
    Developer
    Johannesburg
    South Africa

    I can do all things through Christ who strengthens me. - Holy Bible
    I am a man of fixed and unbending principles, the first of which is to be flexible at all times. - Everett Mckinley Dirkson (Well, I am trying. - Manie Verster)

  • My new problem now is that I am not getting any e-mails out through database mail to external e-mail addresses.

    That issue is caused by the Mail server not allowing relaying.

    You can get with your mail administrator on the issue; he can add the IP address of the SQL server that is sending the emails to the "white list" so it allows relaying.

    Also usually most servers are set up so that if you are using authentication (Basic Authentication sending a username and password vs anonymous ) the mail server will relay to outside domains;

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 10 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic. Login to reply