Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Database Mail 2008 problem

Database Mail 2008 problem

Scheduled Pinned Locked Moved Database
helpdatabasesharepointsql-servercom
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    Falconapollo
    wrote on last edited by
    #1

    I have configured SQL Server 2008 Enterprise --Database Mail with the SQL below. But when I try to send mails with my hotmail e-mail account, I just get the error message(

    select * from msdb.dbo.sysmail_event_log;

    ):

    Quote:

    The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 24 (2011-11-17T17:20:53). 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.53.109:25)

    I have tried several email account, like hotmail(smtp.live.com), QQ(smtp.qq.com), gmail(smtp.gmail.com) and 163(smtp.163.com), but what I got was the same message as above. Any help would be greatly appreciated!

    -- ENABLE DATABASE MAIL FEATURE IN SYSTEM CONFIGURATION
    use master
    go
    sp_configure 'show advanced options',1
    go
    reconfigure with override
    go
    sp_configure 'Database Mail XPs',1
    go
    reconfigure
    go

    -- DECLARE DATABASE MAIL ACCOUNT PARAMETERS
    Declare @qmail\_account\_name as varchar(64);
    Declare @qmail\_account\_description as varchar(64);
    Declare @qmail\_account\_email\_address as varchar(64);
    Declare @qmail\_account\_display\_name as varchar(64);
    Declare @qmail\_account\_username as varchar(64);
    Declare @qmail\_account\_password as varchar(64);
    Declare @qmail\_account\_mailserver\_name as varchar(64);
    
    -- DECLARE PROFILE PARAMETERS
    declare @qmail\_profile\_profile\_name as varchar(64);
    declare @qmail\_profile\_description as varchar(64);
    
    -- DECLARE PRINCIPLES
    declare @qprincipal\_name as varchar(16);
    
    **\-- SET SMTP ACCOUNT DETAILS, USERNAME AND PASSWORD HERE
    set @qmail\_account\_mailserver\_name = 'smtp.live.com'-- SMTP Server Name
    set @qmail\_account\_username='hellomoney'  -- SMTP User Name
    set @qmail\_account\_email\_address = 'hellomoney@hotmail.com' -- Email Address
    set @qmail\_account\_password='123'  -- PASSWORD FOR SMTP User**
    
    
    set @qmail\_account\_name = 'TestAdministrator'
    set @qmail\_account\_description = 'Mail account for administrative e-mail.'
    set @qmail\_account\_display\_name = 'Test Automated Mailer'
    
    -- PROFILE PARAMETERS ASSIGNMENT
    set  @qmail\_profile\_profile\_name = 'MyEmailServiceProfile'
    set  @qmail\_profile\_description = 'Profile used for database mail jobs'
    
    --PROFILE TYPE
    set @qprincipal\_name= 'public'
    if ( @qmail\_account\_mails
    
    M 1 Reply Last reply
    0
    • F Falconapollo

      I have configured SQL Server 2008 Enterprise --Database Mail with the SQL below. But when I try to send mails with my hotmail e-mail account, I just get the error message(

      select * from msdb.dbo.sysmail_event_log;

      ):

      Quote:

      The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 24 (2011-11-17T17:20:53). 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.53.109:25)

      I have tried several email account, like hotmail(smtp.live.com), QQ(smtp.qq.com), gmail(smtp.gmail.com) and 163(smtp.163.com), but what I got was the same message as above. Any help would be greatly appreciated!

      -- ENABLE DATABASE MAIL FEATURE IN SYSTEM CONFIGURATION
      use master
      go
      sp_configure 'show advanced options',1
      go
      reconfigure with override
      go
      sp_configure 'Database Mail XPs',1
      go
      reconfigure
      go

      -- DECLARE DATABASE MAIL ACCOUNT PARAMETERS
      Declare @qmail\_account\_name as varchar(64);
      Declare @qmail\_account\_description as varchar(64);
      Declare @qmail\_account\_email\_address as varchar(64);
      Declare @qmail\_account\_display\_name as varchar(64);
      Declare @qmail\_account\_username as varchar(64);
      Declare @qmail\_account\_password as varchar(64);
      Declare @qmail\_account\_mailserver\_name as varchar(64);
      
      -- DECLARE PROFILE PARAMETERS
      declare @qmail\_profile\_profile\_name as varchar(64);
      declare @qmail\_profile\_description as varchar(64);
      
      -- DECLARE PRINCIPLES
      declare @qprincipal\_name as varchar(16);
      
      **\-- SET SMTP ACCOUNT DETAILS, USERNAME AND PASSWORD HERE
      set @qmail\_account\_mailserver\_name = 'smtp.live.com'-- SMTP Server Name
      set @qmail\_account\_username='hellomoney'  -- SMTP User Name
      set @qmail\_account\_email\_address = 'hellomoney@hotmail.com' -- Email Address
      set @qmail\_account\_password='123'  -- PASSWORD FOR SMTP User**
      
      
      set @qmail\_account\_name = 'TestAdministrator'
      set @qmail\_account\_description = 'Mail account for administrative e-mail.'
      set @qmail\_account\_display\_name = 'Test Automated Mailer'
      
      -- PROFILE PARAMETERS ASSIGNMENT
      set  @qmail\_profile\_profile\_name = 'MyEmailServiceProfile'
      set  @qmail\_profile\_description = 'Profile used for database mail jobs'
      
      --PROFILE TYPE
      set @qprincipal\_name= 'public'
      if ( @qmail\_account\_mails
      
      M Offline
      M Offline
      Mycroft Holmes
      wrote on last edited by
      #2

      Caveat I almost never use sql mail. Are you sure that you can use a public SMTP server from sql mail. It would never occur to me to try, we always use an internal server.

      Never underestimate the power of human stupidity RAH

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups