用于向我的应用程序发送电子邮件的存储过程 [英] stored procedure for sending email into my application

查看:120
本文介绍了用于向我的应用程序发送电子邮件的存储过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有2表让我们说客户和队列邮件.我必须从客户表中检索该列的所有电子邮件ID,并将其插入队列邮件表中,并带有如下所述的其他列.当客户表中的用户在今天的日期之前在[CreatedOnUtc]字段中注册时,我想向所有用户发送消息.

请帮我解决这个问题.我不想要gmail模式答案.
这是针对我的应用程序本身而不是全局的.

队列邮件表
SELECT TOP 1000 [Id]
,[优先级]
,[来自]
,[FromName]
,[至]
,[ToName]
,[CC]
,[Bcc]
,[主题]
,[Body]
,[CreatedOnUtc]
,[SentTries]
,[SentOnUtc]
,[EmailAccountId]
来自[QueuedEmail]

客户表
SELECT TOP 1000 [Id]
,[CustomerGuid]
,[用户名]
,[电子邮件]
,[密码]
,[PasswordFormatId]
,[PasswordSalt]
,[AdminComment]
,[LanguageId]
,[CurrencyId]
,[AffiliateId]
,[有效]
,[已删除]
,[IsSystemAccount]
,[SystemName]
,[LastIpAddress]
,[CreatedOnUtc]
,[LastLoginDateUtc]
FROM [Customer]

Hi,

i have 2 table let us say customer and queuemail. i have to retrieve all email id of that column from customer table and inserted into queuemail table with additional columns as mentioned below. when a user in customer table registered in before today’s date on i.e,[CreatedOnUtc] field then i want to send message to all the users.

Please help me out on this. i dont want gmail pattern answers.
this is for my application itself not globally.

Queuemail table
SELECT TOP 1000 [Id]
,[Priority]
,[From]
,[FromName]
,[To]
,[ToName]
,[CC]
,[Bcc]
,[Subject]
,[Body]
,[CreatedOnUtc]
,[SentTries]
,[SentOnUtc]
,[EmailAccountId]
FROM [QueuedEmail]

customer table
SELECT TOP 1000 [Id]
,[CustomerGuid]
,[Username]
,[Email]
,[Password]
,[PasswordFormatId]
,[PasswordSalt]
,[AdminComment]
,[LanguageId]
,[CurrencyId]
,[AffiliateId]
,[Active]
,[Deleted]
,[IsSystemAccount]
,[SystemName]
,[LastIpAddress]
,[CreatedOnUtc]
,[LastLoginDateUtc]
FROM [Customer]

推荐答案

有很多机会去Google ....

http://forums.asp.net/t/1361259.aspx/1 [ ^ ]

http://www.vbforums.com/showthread.php?t=280616 [ ^ ]

http://www.emailarchitect.net/webapp/smtpcom/developers/sqlemail.asp [ ^ ]

http://stackoverflow.com/questions/3177267/how-to-send- mail-from-stored-procedure [ ^ ]

http://stackoverflow.com/questions/7112818/sql-server-stored- procedure-to-send-email [ ^ ]

http://www.sqlteam.com/article/sending-smtp-mail- using-a-stored-procedure [ ^ ]

希望您不要对Google感到羞耻...
lot of chance to google....

http://forums.asp.net/t/1361259.aspx/1[^]

http://www.vbforums.com/showthread.php?t=280616[^]

http://www.emailarchitect.net/webapp/smtpcom/developers/sqlemail.asp[^]

http://stackoverflow.com/questions/3177267/how-to-send-mail-from-stored-procedure[^]

http://stackoverflow.com/questions/7112818/sql-server-stored-procedure-to-send-email[^]

http://www.sqlteam.com/article/sending-smtp-mail-using-a-stored-procedure[^]

Hope you are not ashamed to google...


这篇关于用于向我的应用程序发送电子邮件的存储过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆