title: How to send e-mail from SQL Server?
body: <p>I have configured database mail – send email ...create one account also... I used below query</p>
  
  <pre><code>EXEC msdb.dbo.sysmail_add_profile_sp
  @profile_name = 'SQL 2008 Profile',
  @description = 'Used for general-purpose emailing.'
  </code></pre>
  
  <p>The second script creates the new SMTP account:</p>
  
  <pre><code>EXEC msdb.dbo.sysmail_add_account_sp
  @account_name = 'MailAcct1',
  @description = 'SMTP Account.',
  @email_address = 'jojin127@gmail.com',
  @display_name = 'Mail Account',
  @mailserver_name = 'smtp.gmail.com' ;
  </code></pre>
  
  <p>The third script associates this new account with the new profile:</p>
  
  <pre><code>EXEC msdb.dbo.sysmail_add_profileaccount_sp
  @profile_name = 'SQL 2008 Profile',
  @account_name = 'MailAcct1',
  @sequence_number =1;
  
  exec msdb.dbo.sysmail_add_principalprofile_sp
  @profile_name = 'SQL 2008 Profile',
  @principal_name = 'public',
  @is_default = 0 ;
  
  
  exec msdb.dbo.sysmail_configure_sp 'AccountRetryDelay', 1200
  </code></pre>
  
  <p>After all I go to sent test mail... after write to address getting error like</p>
  
  <blockquote>
    <p>your test email has has been queued for processing.Depending on the network speed and the backlog of the SMTP server.it may take several minutes before the email is delivered to the receipt</p>
  </blockquote>
  
  <p>please help me out... </p>
  
  <p>One more sent test mail they asking one to address in there actually what I need to written
  email or servername</p>