Skip Navigation Links
Novas Tecnologias
Ferramentas Adicionais
Ferramentas Adicionais


Dica No :
371
Assunto : SQL Server
Titulo: Enviando um EMAIL sem configurar o client MAPI

Gostou do texto ? Vote e dê sua opinião! Pontuação atual :

Translate this page now :






Adicione aos Favoritos!
BlogBlogs Rec6 Linkk Ueba Technorati Delicious DiggIt! StumbleUpon



A XP_SendMail é um recurso muito útil do sql server, mas exige a configuração de um client MAPI (outlook) no servidor de banco, o que torna seu uso complexo.

Uma forma mais simples de resolver o problema é fazer uso do CDONTS através do SQL Server. Isso dispensa a configuração do client MAPI. Claro que o exemplo abaixo é muito inferior 'as funções da xp_SendMail, mas pelo menos dispensa a configuração de um client MAPI, veja :

CREATE PROCEDURE xp_cdosendmail(
@Addr VARCHAR(255),
@Msg VARCHAR(8000),
@Subj VARCHAR(255),
@From VARCHAR(255) = 'defaultemail@domain.com') AS

DECLARE @CDO INT, @result INT, @Out INT

--Create CDONTS.NewMail object
EXECUTE @result = sp_OACreate 'CDONTS.NewMail', @CDO OUT
IF @result <> 0 PRINT 'CDONTS.NewMail'

--Call Send method of the object
EXECUTE @result = sp_OAMethod @CDO, 'Send', NULL, @From, @Addr, @Subj, @Msg,
0
IF @result <> 0 PRINT 'Send'

--Destroy CDO
EXECUTE @result = sp_OADestroy @CDO


Nome :
E-mail:
Comentarios :
 
 
Os Últimos Comentários
data: 11/4/2017 3:46:00 AM
nome: Andrea Gibson
email: jbcuiyowihe@crksqk.com
comentário:
This is a message to the Enviando um EMAIL sem configurar o client MAPI - B?falo Inform?tica webmaster. Your website is missing out on at least 300 visitors per day. Our traffic system will dramatically increase your traffic to your site: https://flxv.tk/6 - We offer 500 free targeted visitors during our free trial period and we offer up to 30,000 targeted visitors per month. Hope this helps :) Unsubscribe here: http://priscilarodrigues.com.br/url/11

data: 10/24/2017 2:40:00 AM
nome: Sandra
email: uwsbstze@bgjfwx.com
comentário:
I decided to leave a message here on your Enviando um EMAIL sem configurar o client MAPI - B?falo Inform?tica page instead of calling you. Do you need more likes for your Facebook Fan Page? The more people that LIKE your website and fanpage on Facebook, the more credibility you will have with new visitors. It works the same for Twitter, Instagram and Youtube. When people visit your page and see that you have a lot of followers, they now want to follow you too. They too want to know what all the hype is and why all those people are following you. Get some free likes, followers, and views just for trying this service: http://corta.co/9UC Unsubscribe here: http://priscilarodrigues.com.br/url/2l

data: 9/11/2017 12:29:00 AM
nome: Sarah Carlson
email: wjyylf@fbfebl.com
comentário:
I came across your Enviando um EMAIL sem configurar o client MAPI - B?falo Inform?tica website and wanted to let you know that we have decided to open our POWERFUL and PRIVATE web traffic system to the public for a limited time! You can sign up for our targeted traffic network with a free trial as we make this offer available again. If you need targeted traffic that is interested in your subject matter or products start your free trial today: http://pcgroup.com.uy/15 Unsubscribe here: http://priscilarodrigues.com.br/url/11

data: 9/5/2017 11:07:00 AM
nome: Sarah Carlson
email: sbfvfy@sgfvyo.com
comentário:
I came across your Enviando um EMAIL sem configurar o client MAPI - B?falo Inform?tica website and wanted to let you know that we have decided to open our POWERFUL and PRIVATE website traffic system to the public for a limited time! You can sign up for our targeted traffic network with a free trial as we make this offer available again. If you need targeted traffic that is interested in your subject matter or products start your free trial today: http://url.euqueroserummacaco.com/ifa Unsubscribe here: http://priscilarodrigues.com.br/url/11

data: 8/20/2017 4:04:00 PM
nome: Sarah Carlson
email: zvyczw@qnrcte.com
comentário:
This is a comment to the Enviando um EMAIL sem configurar o client MAPI - B?falo Inform?tica admin. Your website is missing out on at least 300 visitors per day. Our traffic system will dramatically increase your traffic to your site: https://flxv.tk/6 - We offer 500 free targeted visitors during our free trial period and we offer up to 30,000 targeted visitors per month. Hope this helps :) Unsubscribe here: http://pcgroup.com.uy/2a

 1  
Dicas
Dica do Dia
Receba Dicas Por Email
E-mail :  
 


 (help)
Aceito receber informativos do devASPNet, informações de eventos e treinamentos

Veja Quais Informativos Você Receberá

Pesquisar Dicas
Pesquisar Artigos, Dicas e Noticias

Banco de Dados
Algumas Entrevistas
Links Importantes

Búfalo Informática, Treinamento e Consultoria
R. Alvaro Alvim, 37/920 Centro - Cinelândia - Rio de Janeiro Cep: 20031-010
Tel : (21) 2262-1368 (21) 9240-5134 E-mail : Contato@bufaloinfo.com.br