Database Mail

  • I had DB Mail working properly while using our ISP as the SMTP server. We switched to Google business mail - the free version and now I can't get it to work no matter what I do. The reason we switched was that some emails got lost and the ISP wouldn't give us enough disk space for the accounts.

    I've tried Anonymous authentication, Basic Authenticaion using the same email address and password that is authenticated at Google. I've tried changing the SMTP port to 465 from 25. I've tried checking and unchecking the Requires SSL Connection. All results are the same with the same message:

    The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2008-08-03T11:41:19). Exception Message: Cannot send mails to mail server. (The operation has timed out.). Sending Mail using Account 1 (2008-08-03T11:43:09). Exception Message: Cannot send mails to mail server. (The operation has timed out.). )

    I'm thinking that Google has some sort of SPAM filtering going on or possibly there is a reverse lookup problem with the domain name.

    Has anyone had this problem and solved it?

    Todd Fifield

  • Use Port # 587 instead of 465. Also use SSL and you need to enter your gmail account info while configuring the DB mail using gmail. Enter your both account credential "username@gmail.com" and "password".

  • Chintan,

    Thanks for the advice. I'll try the port change today.

    I'm a little confused at the 'username@gmail.com' advice. We use the business feature where our domain name is part of the EMail address. The EMail address to the outside is:

    info@ourdomain.com

    This actually resolves to:

    mail.google.com/a/ourdomain

    I've been using info@ourdomain.com as the sender and replyto EMail address.

    Todd Fifield

  • todd,

    i have been configuring my home machine with free Gmail account and it's been working fine. I have never used gmail business account so frankly speaking i don't know how it works. I think then you just need to change the port, select SSL and enter your business account info in and i hope it will work.

    good luck

  • Hi Did you find a solution to your problem. I am having the exact same problem. I am a newbie to SQL server 2008, but I did configure it to work the first time. After SP 1 2008 for sql server, I subsequently ran into problems and had to create a new instance. I have tried all possible settings in Database mail configuration utility. In parameters i increased the time out period, but still no luck

    The error message in the log file

    The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 2 (2009-04-30T12:25:17). Exception Message: Cannot send mails to mail server. (The operation has timed out.)

    I have configured sql server agent to use my database mail profile.

  • Drushen,

    I never did get a solution for GMail. What we ended up doing was set up a Linux box running Zimbra to use as the SMTP server. The only thing the box was used for was Database Mail. It's been working for may months now.

    Todd

  • Todd,

    Try the following:

    account name: your SQL server instance name

    PORT: let it be the default

    smtp: your smtp server name (smoething like smtp.gmail.com)

    authentication: use any (like windows, SQL server or any)

    The only trick is the account name and the smtp account. I had problems trying to send mail using database mail to my gmail account, but trying this will work out.

    Let me know how it worked out or if u have any errors post the steps u did and the error message.

    Hope this helps,

    \\K 🙂

    ______________________________________________________________________________________________________________________________________________________________________________________
    HTH !
    Kin
    MCTS : 2005, 2008
    Active SQL Server Community Contributor 🙂

  • Hi friends,

    I used the following settings to make free gmail account working for me in Database Mail.

    Outgoing mail server (SMTP)

    Email address: gmailID@gmail.com

    Display name: Name you like others to know that email came from.

    Reply e-mail: can be same as Email mentioned above or some other email id.

    Server name: smtp.gmail.com

    Port No: 587

    SMTP Authentication: -

    Select Basic Authentication

    User name: GMailID

    Password: Your GMail ID password

    Confirm password: Same as above

    Save the above settings and hopefully it will work for you as it worked for me.

    Good luck,

    Parminder

  • In my last reply to this post, I forgot to mention to also select - "This server requires a secure connection (SSL)".

    Sorry for the inconvenience.

    Thanks,

    Parminder

  • Thanks man, you saved my day.

    Indeed, the smtp port for gmail must be 587

    Best,

    F

  • From using Port 587 I get following Error

    The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2010-07-30T12:02:56). Exception Message: Could not connect to mail server. (A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 74.125.127.109:587). )

    From using Port 465 I get following Error

    The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2010-07-30T12:28:41). Exception Message: Cannot send mails to mail server. (The operation has timed out.). )

  • Thanks a lot.

    It works.

    Email Add: XXXX@gmail.com

    Server Name : smtp.gmail.com

    Port Number : 587

    SSL - Yes(Check)

    SMPT Authentication : Basic

    User name : XXXX@gmail.com

    Password: ********

    Confirm Password: ********

    🙂

    Rizwan Ali

    DBA

Viewing 12 posts - 1 through 11 (of 11 total)

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