![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
hi all my query is how can i send mail by using sql server, i think by unsing xp_sendmail store procedure we can do this but my problem is what paramater to be pass to this store procedure if i want to send mail from my local machine to another user, bcos i am geeting this error msg in query analyzer... query:-EXEC master..xp_sendmail 'ss35934' (ss35934 is valid user name present into my local nerwork) getting error msg :- xp_sendmail: failed with mail error 0x80040111 from:- sachin shah |
#3
| |||
| |||
|
|
On Aug 24, 7:47 am, sachin shah <sachin28... (AT) gmail (DOT) com> wrote: hi all my query is how can i send mail by using sql server, i think by unsing xp_sendmail store procedure we can do this but my problem is what paramater to be pass to this store procedure if i want to send mail from my local machine to another user, bcos i am geeting this error msg in query analyzer... query:-EXEC master..xp_sendmail 'ss35934' (ss35934 is valid user name present into my local nerwork) getting error msg :- xp_sendmail: failed with mail error 0x80040111 from:- sachin shah I had a similar problem and was advised not to use xp_sendmail. I don't understand how sql server communicates with email. I don't know the difference between using xp_sendmail (does not work) and sending a notification email in the job scheduler (which does work)! There's an alternative you could try which is available fromhttp://www.sqldev.net/xp/xpsmtp.htm |
#4
| |||
| |||
|
|
but after executing these query getting the following error msg.. Error: connecting to server smarthost |
|
On Aug 24, 12:57 pm, stephen <m0604... (AT) googlemail (DOT) com> wrote: On Aug 24, 7:47 am, sachin shah <sachin28... (AT) gmail (DOT) com> wrote: hi all my query is how can i send mail by using sql server, i think by unsing xp_sendmail store procedure we can do this but my problem is what paramater to be pass to this store procedure if i want to send mail from my local machine to another user, bcos i am geeting this error msg in query analyzer... query:-EXEC master..xp_sendmail 'ss35934' (ss35934 is valid user name present into my local nerwork) getting error msg :- xp_sendmail: failed with mail error 0x80040111 from:- sachin shah I had a similar problem and was advised not to use xp_sendmail. I don't understand how sql server communicates with email. I don't know the difference between using xp_sendmail (does not work) and sending a notification email in the job scheduler (which does work)! There's an alternative you could try which is available fromhttp://www.sqldev.net/xp/xpsmtp.htm hi stephen, i tried with xp_smtp_sendmail but still getting the error .... as given into site i register the xp_smtp_sendmail store procedure and the assign the grant permission to that store procedure then writing the following query declare @rc int exec @rc = master.dbo.xp_smtp_sendmail @FROM = N'MyEmail (AT) MyDomain (DOT) com', @TO = N'MyFriend (AT) HisDomain (DOT) com' select RC = @rc go in place of this 'MyEmail (AT) MyDomain (DOT) com' i am writing the real mail id (first one) in place of this 'MyFriend (AT) HisDomain (DOT) com' i am writing the real mail id (second one) but after executing these query getting the following error msg.. Error: connecting to server smarthost can u plz tell me is there any sql server id we need to right into above query (like admin (AT) sqlserver (DOT) com) from sachin shah |
#5
| |||
| |||
|
|
but after executing these query getting the following error msg.. Error: connecting to server smarthost 'smarthost' is the default name of the SMTP server. It is very likely that your actual SMTP server is named something else so you'll need to specify the name using the @server parameter: DECLARE @rc int EXEC @rc = master.dbo.xp_smtp_sendmail @FROM = N'MyEm... (AT) MyDomain (DOT) com', @TO = N'MyFri... (AT) HisDomain (DOT) com', @server =N'MY-SMTP-SERVER' SELECT RC = @rc See the xpxmtp documentation for detailed usage:http://www.sqldev.net/xp/xpsmtp.htm -- Hope this helps. Dan Guzman SQL Server MVP "sachin shah" <sachin28... (AT) gmail (DOT) com> wrote in message news:1187943974.754692.292770 (AT) r23g2000prd (DOT) googlegroups.com... On Aug 24, 12:57 pm, stephen <m0604... (AT) googlemail (DOT) com> wrote: On Aug 24, 7:47 am, sachin shah <sachin28... (AT) gmail (DOT) com> wrote: hi all my query is how can i send mail by using sql server, i think by unsing xp_sendmail store procedure we can do this but my problem is what paramater to be pass to this store procedure if i want to send mail from my local machine to another user, bcos i am geeting this error msg in query analyzer... query:-EXEC master..xp_sendmail 'ss35934' (ss35934 is valid user name present into my local nerwork) getting error msg :- xp_sendmail: failed with mail error 0x80040111 from:- sachin shah I had a similar problem and was advised not to use xp_sendmail. I don't understand how sql server communicates with email. I don't know the difference between using xp_sendmail (does not work) and sending a notification email in the job scheduler (which does work)! There's an alternative you could try which is available fromhttp://www.sqldev.net/xp/xpsmtp.htm hi stephen, i tried with xp_smtp_sendmail but still getting the error .... as given into site i register the xp_smtp_sendmail store procedure and the assign the grant permission to that store procedure then writing the following query declare @rc int exec @rc = master.dbo.xp_smtp_sendmail @FROM = N'MyEm... (AT) MyDomain (DOT) com', @TO = N'MyFri... (AT) HisDomain (DOT) com' select RC = @rc go in place of this 'MyEm... (AT) MyDomain (DOT) com' i am writing the real mail id (first one) in place of this 'MyFri... (AT) HisDomain (DOT) com' i am writing the real mail id (second one) but after executing these query getting the following error msg.. Error: connecting to server smarthost can u plz tell me is there any sql server id we need to right into above query (like ad... (AT) sqlserver (DOT) com) from sachin shah- Hide quoted text - - Show quoted text - |
#6
| |||
| |||
|
|
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 (AT) MyDomain (DOT) com', @FROM_NAME = N'My Full Name', @replyto = N'sashah (AT) systime (DOT) net', @TO = N'sachin28880 (AT) gmail (DOT) 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 |
|
(Note :- What is this MAPI and by where it is references in sql server ) |
![]() |
| Thread Tools | |
| Display Modes | |
| |