You are here: Re: how can i send mail by using sql server « MsSQL Server « IT news, forums, messages
Re: how can i send mail by using sql server

Posted by Erland Sommarskog on 08/29/07 21:35

sachin shah (sachin28880@gmail.com) writes:
> as per u r guide line i insatalled that xp_smtp_sendmail store
> procedure and assign the grant permission to that SP but after
> executing the following query its showing following error....
>
> declare @rc int
> exec @rc = master.dbo.xp_smtp_sendmail
> @FROM = N'MyEmail@MyDomain.com',
> @FROM_NAME = N'My Full Name',
> @replyto = N'sashah@systime.net',
> @TO = N'sachin28880@gmail.com',
> @priority = N'NORMAL',
> @subject = N'Hello SQL Server SMTP Mail',
> @type = N'text/plain',
> @message = N'Goodbye MAPI, goodbye Outlook',
> @timeout = 10000,
> @server = N'mail.sqldev.net'
> select RC = @rc
> go
>
>
> Error Dispalyed:-
> Error: sending message
> Server response: 451 Local Error
> put; end with <CRLF>.<CRLF>
>
> give me the proper solution

What is says. That is a message from the SMTP server. SMTP requires
that you terminate your message with a dot on a single line. I have
never user xp_smtp_sendmail, but apparently it does not add this dot
for you.

But you should change the SMTP server to the one that you normally use.
SMTP servers do normally not require authentication; anyone connect.
However, an SMTP server is set up to server a set of IP addresses, and if
neither the sender nor the receiver is in that set, the SMTP server should
refused to transmit the mail.

> (Note :- What is this MAPI and by where it is references in sql
> server )

MAPI is the mail protocol used by Outlook and other Microsoft mail
program, and it does not have much to do with SQL Server as such.

--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация