设置SQL Email,使用ASP通过数据库发送电子邮件 [英] Setting SQL Email, using ASP to email using database

查看:148
本文介绍了设置SQL Email,使用ASP通过数据库发送电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

低端:

Windows 2003上的本地Web服务器

托管动态网站绑定到内部访问应用程序


好​​的,基本上,如何设置,人们可以登录我们的网站并输入数据(插入记录),最后,我们有一个Access应用程序,我们可以玩使用通过网站输入的数据。目前,我们没有将任一服务器设置为邮件服务器。


我们需要做什么:

当客户输入数据时我们的网站,他们的主管以及大约2-3个与交易相关的其他人需要通过电子邮件通知订单已提交。那么我该如何编码呢?在包含插入记录的页面上?或者在Insert Record之后将它们重定向到另一个发送邮件的页面?


此外,它需要动态地给人们发送电子邮件,所以我不能只是在john@doe.com上输入一个值,我需要输入像< ;%=(megalist.Fields.Item(" email")。Value)%>


我启用哪个服务器邮件?


我正在阅读有关SQL Mail等的信息,因为我们每周都会向客户发送大量电子邮件,所以这很好,但我不知道如何设置它,我看起来对任何教程都有所了解。


我是否要将SQL服务器设置为邮件服务器,以便我们可以使用SQL数据库发送电子邮件以及从网站输入的数据?但话说回来,网站指向Web服务器,它将数据从SQL服务器中提取出来(因此除非Web服务器是邮件服务器,否则不会发送任何内容,我是对的吗?)


*叹气*


我对SQL知之甚少,而且我被要求诋毁这个并且我100%困惑。我是一名图形艺术家,而不是程序员! LOL


提前感谢能够/将帮助我的任何人。

解决方案

假设您有以下页面:

Order_Form.asp =用户输入他们想要订购的物品

Order_Submit.asp =您要更新数据库的地方


邮件发送应在Order_Submit.asp中完成。无需将用户转发到另一个发送电子邮件的特殊页面。


要发送电子邮件,请尝试在此网站或Google上搜索以下条款:ASP,CDO和邮件发送。


对于服务器,您需要有专用的SMTP服务器或启用Windows 2003服务器来处理电子邮件。你不会从SQL Server应用程序发送电子邮件。


如果你认为这太难了,你可以让你的主管知道,这样他就可以帮助你。 :)


实际上,在他们输入数据的页面中,它只是一个设置有插入记录代码的页面。这就是我对第二页发送电子邮件的意思(我认为我们的想法是一样的,只是没有相同)。我想换句话说我在想什么,就是在page1.asp上插入记录,然后将它转到page2.asp并且它不一定需要继承信息,但是从page2.asp使用a发送电子邮件记录集(所以我可以抓住主管,客户结果经理,房地产经纪人等)来使用代码。


好​​的,所以在Web服务器上设置SMTP然后?我实际看,但没有看到SMTP服务。在服务器配置下有一个虚拟邮件服务器,但这就是我所看到的......


这将是一个有趣的冒险...... *讽刺*


假设您有以下页面:

Order_Form.asp =用户输入他们想要订购的物品

Order_Submit.asp =您要更新数据库的位置


邮件发送应在Order_Submit.asp中完成。无需将用户转发到另一个发送电子邮件的特殊页面。


要发送电子邮件,请尝试在此网站或Google上搜索以下条款:ASP,CDO和邮件发送。


对于服务器,您需要有专用的SMTP服务器或启用Windows 2003服务器来处理电子邮件。你不会从SQL Server应用程序发送电子邮件。


如果你认为这太难了,你可以让你的主管知道,这样他就可以帮助你。 :)


我认为如果你在插入后直接发送电子邮件而不是将其转发到另一个页面会更好。但这只是我的偏好。


我自己从不设置SMTP但是如果你运行IIS,你可能能够找到默认SMTP虚拟服务器。在计算机/服务器下。它可能是您的起点。


您可以通过在命令提示符下运行来测试您的服务器是否支持SMTP:

展开 < span class =codeDivider> | 选择 | Wrap | Line编号

The low down:
Local Web Server on Windows 2003
Local SQL Server on Windows 2003
Hosting dynamic website tied to inhouse Access Application

Ok, basically, how it is set up, people can login to our website and enter data (insert record), on our end, we have an Access application where we can play with the data that was entered via the website. Currently, we do not have either server set up as a Mail server.

What we need to be able to do:
When a customer enters data on our website, their supervisor, and about 2-3 other people related to the transaction need to be emailed to be notified that an order was submitted. So how do I code that? On the page with the Insert Record? OR after Insert Record redirect them to another page that sends the mail out?

Also, it needs to dynamically email people, so I can''t just put in john@doe.com for a value, I''d need to put in something like <%=(megalist.Fields.Item("email").Value)%>

Which server do I enable the mail?

I was reading about SQL Mail etc, which would be good since we do mass emails to clients weekly, but I have no idea how to set that up and I look crossed eyed at any tutorial.

Do I want to set up theSQL server to also be a Mail Server that way we can use the SQL database to email as well as data entered from the website? But then again, the website points to the Web Server which pulls data off the SQL server (so unless the Web Server is a mail server, nothing will be sent, am I right?)

*sigh*

I know very little about SQL and I''m being asked to impliment this and I am 100% confused. I''m a graphics artist not a programmer! LOL

Thanks in advance to anyone who can/will help me.

解决方案

Assuming you have the following pages:
Order_Form.asp = where user enters the items they want to order
Order_Submit.asp = where you are updating the database

The mail sending should be done in Order_Submit.asp. There is no need to forward the user to another special page which sends email.

To send email, try searching this site or Google for the terms: ASP, CDO and mail sending.

For the server, you need to have a dedicated SMTP server or enable your Windows 2003 server to handle email. You don''t send the email from the SQL Server application.

If you think it''s too hard, you can just let your supervisor know so he can help you. :)


Actually, one the page where they enter data, it''s just a single page set up with an Insert Record code. And that''s what I meant about the send email from a second page (I think we are thinking the same, just didn''t come out the same). I guess in other words what I am thinking, is do Insert Record on page1.asp then have it go to page2.asp and it doesn''t necessarily need to carry over the information, but have it email from page2.asp using a Recordset (so I can grab the supervisor, client results manager, real estate agents, etc) from that to use in the code.

Ok, so set up the SMTP on the web server then? I actually looked but did not see a SMTP Service. There was a virtual mail server under the server configuration, but that was all I saw...

this is going to be a fun adventure... *sarcastic*

Assuming you have the following pages:
Order_Form.asp = where user enters the items they want to order
Order_Submit.asp = where you are updating the database

The mail sending should be done in Order_Submit.asp. There is no need to forward the user to another special page which sends email.

To send email, try searching this site or Google for the terms: ASP, CDO and mail sending.

For the server, you need to have a dedicated SMTP server or enable your Windows 2003 server to handle email. You don''t send the email from the SQL Server application.

If you think it''s too hard, you can just let your supervisor know so he can help you. :)


I think it''s better if you send the email straight after the insert instead of forwarding it to another page. But that''s just my preference.

I never set up the SMTP myself but if you run IIS you may be able to find "Default SMTP Virtual Server" under the computer/server. It could be the starting point for you.

You can test whether or not your server is SMTP capable by running this in command prompt:

Expand|Select|Wrap|Line Numbers


这篇关于设置SQL Email,使用ASP通过数据库发送电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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