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: 6/18/2017 4:12:00 AM
nome: Ann Weaver
email: qgriwiggtnb@iobggffz.com
comentário:
This is a message 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: http://v-doc.co/nm/jkfq0 - 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: 6/14/2017 9:59:00 AM
nome: Sarah Hughes
email: clzgichky@qgscaticcxt.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://rofel.me/1 Unsubscribe here: http://tdil.co/5p

data: 5/24/2017 8:22:00 PM
nome: Chelsea Wallace
email: eguswqv@xxhqpqghedt.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://magc.co/7fe Unsubscribe here: http://acortarurl.es/97

data: 3/30/2017 1:08:00 AM
nome: Tami Sandoval
email: obkltqhx@jwmgmnvua.com
comentário:
Hi my name is Tami Sandoval and I just wanted to send you a quick note here instead of calling you. I discovered your Enviando um EMAIL sem configurar o client MAPI - B?falo Inform?tica page and noticed you could have a lot more traffic. I have found that the key to running a popular website is making sure the visitors you are getting are interested in your website topic. There is a company that you can get keyword targeted visitors from and they let you try the service for free for 7 days. I managed to get over 300 targeted visitors to day to my website. https://brevis.tk/S

data: 3/25/2017 6:02:00 PM
nome: Tami Sandoval
email: tyebrheyc@ncgxyieorv.com
comentário:
Hi my name is Tami Sandoval and I just wanted to drop you a quick message here instead of calling you. I came to your Enviando um EMAIL sem configurar o client MAPI - B?falo Inform?tica website and noticed you could have a lot more hits. I have found that the key to running a successful website is making sure the visitors you are getting are interested in your subject matter. There is a company that you can get keyword targeted visitors from and they let you try the service for free for 7 days. I managed to get over 300 targeted visitors to day to my site. http://www.axurl.com/5i

 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