简体   繁体   English

从带有凭据的ASP经典页面发送电子邮件

[英]to Sending Email from an ASP classic Page with credentials

I need to send users credentials by email to the users of my app, that is build in asp 我需要通过电子邮件将用户凭据发送给我的应用程序用户,该应用程序内置于ASP中
classic, this is my issue, from a email account, sent information to an user, but doesn´t send username and pass from that user, my code is this, how can manage the user/password? 经典,这是我的问题,是从电子邮件帐户向用户发送信息,但没有发送用户名并从该用户传递密码,我的代码是这个,如何管理用户/密码? what the best way to do it? 最好的方法是什么? thanks in advance. 提前致谢。

t1 = time()
estado=""
email="soporte.web@ipsos.com"       
mail_from = "Soporte <soporte.web@myenterprise.com>"
mail_destino = "Soporte Web Ipsos" & " <" & email &">"
mail_asunto = "Acceso BCI Satisfaccion " & user
ruta=request.ServerVariables("APPL_PHYSICAL_PATH")
on error resume next
mail_cc=""
Dim myMail
Set myMail = CreateObject("CDONTS.NewMail")
myMail.MailFormat = 0   '0 (Mime format), 1 (default Plain Text format)'
myMail.BodyFormat = 0   '0 html, 1 texto'
myMail.Importance = 1   '0 Low, 1 Normal, 2 High '
myMail.From = mail_from
myMail.To = mail_destino
myMail.Cc = mail_cc
'myMail.Cco = mail_cco'
myMail.Subject = mail_asunto
myMail.Body = texto_email
'myMail.AttachFile ruta&"Carta2006.pdf"'
myMail.Send
Set myMail = Nothing
If err.num <> 0 Then   
Response.Write nombre & " / " & email & " / " & "CDONTS Error: " & err.num & " - " & 
err.description
estado="no"
End If

end sub 结束子

In classic ASP there is no standard way (that I can remember) to deal with username/password, other than a using login page for authentication and session variables for maintaining state. 在经典的ASP中,除了使用登录页面进行身份验证和使用会话变量维护状态外,没有标准的方法(我记得)来处理用户名/密码。

If you go to the code of the login page in your application and follow the logic you should see the login happen (where username and password are checked). 如果转到应用程序中登录页面的代码,并遵循逻辑,则应该会看到登录发生(检查了用户名和密码)。 You can then pop those values into a session variable (if this isn't done already) and pull them out later to send in the email. 然后,您可以将这些值弹出到会话变量中(如果尚未完成),然后将其拉出以发送电子邮件。

As an aside, sending a user their username and password in a plain text email is generally discouraged as the email can be read in transit = an opportunity for hackers. 顺便说一句,通常不建议通过纯文本电子邮件向用户发送用户名和密码,因为可以在传输过程中阅读该电子邮件,这是黑客的机会。 But that's up to you... 但这取决于你...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM