PNBR#30180 Ook wachtwoord vergeten via LOGIN-naam
svn path=/Website/trunk/; revision=22734
This commit is contained in:
@@ -39,6 +39,15 @@ var putorders = {
|
||||
var result = hook.sendMLDorders(pkey);
|
||||
hook = null;
|
||||
return result;
|
||||
},
|
||||
sendMail:
|
||||
function (adrTo, strSubj, strBody, params)
|
||||
{
|
||||
var hook = putorders._puo_hook();
|
||||
__Log("Mailing {0}".format(adrTo));
|
||||
var result = hook.puo_sendMail(adrTo, strSubj, strBody, params);
|
||||
hook = null;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
%>
|
||||
|
||||
@@ -42,6 +42,9 @@ if (S("email_password") != 1)
|
||||
<script type="text/javascript">
|
||||
function pass_submit()
|
||||
{
|
||||
if (!validateForm("u2"))
|
||||
return false;
|
||||
|
||||
$.post($("form[name=u2]")[0].action, $("[name=u2]").serialize(), FcltCallbackClose, "json");
|
||||
return true; // disable button
|
||||
}
|
||||
|
||||
@@ -29,11 +29,12 @@ if ((mode == "A" && S("email_password") != 1) ||
|
||||
abort_with_warning(L("lcl_no_auth"));
|
||||
}
|
||||
|
||||
var email = getFParam("email", "A");
|
||||
var emailOrLogin = getFParam("email", "");
|
||||
|
||||
var sql = "SELECT prs_perslid_key, prs_perslid_flags"
|
||||
var sql = "SELECT prs_perslid_key, prs_perslid_flags, prs_perslid_email"
|
||||
+ " FROM prs_v_aanwezigperslid"
|
||||
+ " WHERE UPPER(prs_perslid_email) = " + safe.quoted_sql_upper(email)
|
||||
+ " WHERE (UPPER(prs_perslid_email) = " + safe.quoted_sql_upper(emailOrLogin)
|
||||
+ " OR UPPER(prs_perslid_oslogin) = " + safe.quoted_sql_upper(emailOrLogin) + ")"
|
||||
+ " AND prs_perslid_oslogin IS NOT NULL";
|
||||
if (mode == "A")
|
||||
sql += " AND prs_perslid_wachtwoord_hash IS NOT NULL";
|
||||
@@ -51,6 +52,7 @@ else if ((oRs("prs_perslid_flags").Value & 2) == 2)
|
||||
else
|
||||
{
|
||||
var perslid_key = oRs("prs_perslid_key").Value;
|
||||
var email = oRs("prs_perslid_email").Value; // Voor als oslogin opgegeven
|
||||
|
||||
// verwijder oudere bookmarks, we ondersteunen maximaal <20><>n pending
|
||||
var sql = "DELETE fac_bookmark"
|
||||
@@ -84,7 +86,7 @@ else
|
||||
fac_send_bookmark(bookmarkId, email, L(mode=="A"?"lcl_password_new":"lcl_tokenmail_subject"),
|
||||
L(mode=="A"?"lcl_password_reset":"lcl_tokenmail_body"));
|
||||
|
||||
result.warning = L("lcl_pass2emailsent") + email;
|
||||
result.warning = L("lcl_pass2emailsent") + emailOrLogin;
|
||||
}
|
||||
|
||||
result.success = true;
|
||||
|
||||
@@ -7,59 +7,18 @@
|
||||
Parameters:
|
||||
Context: - Zelfregistratie bevestigen
|
||||
- QRCode voor mobiel registratie e-mailen
|
||||
Note: Normaal gesproken sturen we e-mails via Putorders.exe
|
||||
Note: Normaal gesproken sturen we e-mails via Putorders
|
||||
Soms wil je een e-mail echter heel snel hebben, of (ook)
|
||||
buiten kantoortijden als Putorders helemaal niet draait
|
||||
Dan kun/mag je deze functie gebruiken.
|
||||
Let op: gebruikt CDONTS (die op Windows 2003 standaard wel geinstalleerd is?)
|
||||
|
||||
*/ %>
|
||||
<%
|
||||
function fac_send_mail_html(adrTo, strSubj, strBody, params) {
|
||||
var objMail;
|
||||
params = params || {};
|
||||
|
||||
function fac_send_mail_html(adrTo, strSubj, strBody, params)
|
||||
{
|
||||
if( adrTo != null)
|
||||
{
|
||||
try {
|
||||
// create mail service object
|
||||
objMail = Server.CreateObject("CDO.Message");
|
||||
__Log("mail object created");
|
||||
|
||||
// Zie http://support.microsoft.com/default.aspx?scid=kb;en-us;810702
|
||||
// Zorgen dat euro-tekens goed over komen
|
||||
b = objMail.bodypart
|
||||
b.charset = "unicode-1-1-utf-8";
|
||||
|
||||
var FromAddress = params.FromAddress || S("FromAddress"); // Die is verplicht
|
||||
var ReplyAddress = params.ReplyAddress || S("ReplyAddress") || S("FromAddress");
|
||||
|
||||
// set fields
|
||||
objMail.To = adrTo;
|
||||
objMail.From = FromAddress ;
|
||||
objMail.ReplyTo = ReplyAddress;
|
||||
objMail.Subject = strSubj;
|
||||
objMail.HtmlBody = strBody;
|
||||
|
||||
if (params.logogiffilename)
|
||||
{
|
||||
bdy = strBody.substr(0,strBody.indexOf("</body>")) + "<img src=\"logo.gif\"></body></html>";
|
||||
objMail.addRelatedBodyPart (params.logogiffilename, "logo.gif", 0);
|
||||
}
|
||||
|
||||
// Send mail
|
||||
objMail.Send();
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
if (e.description.length != 0) {
|
||||
__DoLog("adrTo: " + adrTo +
|
||||
"\nstrSubj: " + strSubj
|
||||
// +"\nstrBody: " + strBody
|
||||
);
|
||||
__DoLog("error in sendmail: " + e.description + " number: " + e.number);
|
||||
}
|
||||
}
|
||||
var puo_result = putorders.sendMail(adrTo, strSubj, strBody, params);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -136,7 +136,6 @@ function notificationMail(rec, p_notificationXSL, params)
|
||||
Log2File(2, "Mailnotificatie basis");
|
||||
sendMail( sender_email
|
||||
, receiver_email
|
||||
, "", "", ""
|
||||
, rec("fac_notificatie_oms").Value
|
||||
, rec("fac_notificatie_oms").Value
|
||||
, ""
|
||||
@@ -190,7 +189,6 @@ function notificationMail(rec, p_notificationXSL, params)
|
||||
// In de body
|
||||
sendMail( sender_email
|
||||
, receiver_email
|
||||
, "", "", ""
|
||||
, SubjectText
|
||||
, ""
|
||||
, strResult
|
||||
@@ -204,7 +202,6 @@ function notificationMail(rec, p_notificationXSL, params)
|
||||
Log2File(2, "Mailnotificatie als attachment");
|
||||
sendMail( sender_email
|
||||
, receiver_email
|
||||
, "", "", ""
|
||||
, SubjectText
|
||||
, "Zie HTML attachment"
|
||||
, strResult
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
|
||||
File: puo_putorders.WSC
|
||||
Context: Vanuit de ASP code
|
||||
Note: puo_putorders.wsf is degene die vanuit de scheduled task aangeroepen wordt
|
||||
Note: (de file puo_putorders.wsf is degene die vanuit
|
||||
de scheduled task aangeroepen wordt)
|
||||
|
||||
*/
|
||||
]]>
|
||||
@@ -34,6 +35,12 @@
|
||||
<method name="sendMLDorders">
|
||||
<PARAMETER name="opdr_key"/>
|
||||
</method>
|
||||
<method name="puo_sendMail">
|
||||
<PARAMETER name="adrTo"/>
|
||||
<PARAMETER name="strSubj"/>
|
||||
<PARAMETER name="strBody"/>
|
||||
<PARAMETER name="params"/>
|
||||
</method>
|
||||
</public>
|
||||
|
||||
<script language="javascript" src="../wsf_shared.js"></script>
|
||||
@@ -129,6 +136,20 @@ function sendMLDorders(opdr_key)
|
||||
return result;
|
||||
}
|
||||
|
||||
// Vanuit ASP shared/send_mail.inc
|
||||
function puo_sendMail(adrTo, strSubj, strBody, params)
|
||||
{
|
||||
params = params || {};
|
||||
sendMail( params.FromAddress || S("puo_fromaddress") //p_mailfrom
|
||||
, adrTo
|
||||
, strSubj
|
||||
, null // p_body
|
||||
, strBody // p_bodyhtml
|
||||
, { replyTo: params.ReplyAddress }
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
]]>
|
||||
</script>
|
||||
</component>
|
||||
|
||||
@@ -248,6 +248,9 @@ function connectMail( p_connect
|
||||
var params = { attachFolder: p_attachfolder
|
||||
, attachPassword: encryptpass
|
||||
, include_file: p_attachfile
|
||||
, cc : S("puo_cc")
|
||||
, bcc : S("puo_bcc")
|
||||
, receiptto : S("puo_receiptto")
|
||||
};
|
||||
if ((p_order_mode & 1) == 0) // In body
|
||||
{
|
||||
@@ -263,9 +266,6 @@ function connectMail( p_connect
|
||||
params.attachFileName = p_filename;
|
||||
mailResult = sendMail( p_sender
|
||||
, mail_to
|
||||
, S("puo_cc")
|
||||
, S("puo_bcc")
|
||||
, S("puo_receiptto")
|
||||
, p_mailsubject
|
||||
, ""
|
||||
, content
|
||||
@@ -276,9 +276,6 @@ function connectMail( p_connect
|
||||
{
|
||||
mailResult = sendMail( p_sender
|
||||
, mail_to
|
||||
, S("puo_cc")
|
||||
, S("puo_bcc")
|
||||
, S("puo_receiptto")
|
||||
, p_mailsubject
|
||||
, stream2text(p_textstream)
|
||||
, ""
|
||||
@@ -292,9 +289,6 @@ function connectMail( p_connect
|
||||
params.attachStream = p_textstream;
|
||||
mailResult = sendMail( p_sender
|
||||
, mail_to
|
||||
, S("puo_cc")
|
||||
, S("puo_bcc")
|
||||
, S("puo_receiptto")
|
||||
, p_mailsubject
|
||||
, body
|
||||
, ""
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
// * arguments:
|
||||
// * p_mailfrom: The address the mail is sent from (system if "") or must be replied to
|
||||
// * p_mailto: The address where the mail is sent to
|
||||
// * p_receiptto: The address where the receipt is sent to
|
||||
// * p_subject: The subject of the mail
|
||||
// * p_body: The body of the mail if the OrderInMailBody is not set
|
||||
// * p_bodyhtml: The body of the mail if the OrderInMailBody is not set
|
||||
@@ -19,27 +18,21 @@
|
||||
// * attachPassword: Encrypt(zip) elke attachment met dit wachtwoord als niet leeg
|
||||
// * attachStream: Datastream waarin de attachment zit
|
||||
// * include_file: Deze file toevoegen (gezocht onder S("bdradrfiles_path"))
|
||||
// * cc: The cc address
|
||||
// * bcc: The bcc address
|
||||
// * receiptto: The address where the receipt is sent to
|
||||
// *
|
||||
// ******************************************
|
||||
function sendMail( p_mailfrom
|
||||
, p_mailto
|
||||
, p_cc
|
||||
, p_bcc
|
||||
, p_receiptto
|
||||
, p_subject
|
||||
, p_body
|
||||
, p_bodyhtml
|
||||
, p_params
|
||||
, params
|
||||
)
|
||||
{
|
||||
Log2File(2, "*> sendMail");
|
||||
p_params = p_params || {};
|
||||
var params = { attachFileName: p_params.attachFileName || ""
|
||||
, attachFolder: p_params.attachFolder || ""
|
||||
, attachPassword: p_params.attachPassword || ""
|
||||
, attachStream: p_params.attachStream
|
||||
, include_file: p_params.include_file || ""
|
||||
};
|
||||
params = params || {};
|
||||
|
||||
var objFso = new ActiveXObject("Scripting.FileSystemObject");
|
||||
var objStrm = new ActiveXObject("ADODB.Stream");
|
||||
@@ -67,9 +60,7 @@ function sendMail( p_mailfrom
|
||||
|
||||
Log2File(3, "In SendMail sender=" + p_mailfrom);
|
||||
var Mailsend = false;
|
||||
var MailSender = "";
|
||||
var MailReply = "";
|
||||
// Determine the sender
|
||||
|
||||
var MailSender = S("puo_fromaddress");
|
||||
var MailReply = S("puo_replyaddress");
|
||||
if (p_mailfrom != "")
|
||||
@@ -87,6 +78,8 @@ function sendMail( p_mailfrom
|
||||
MailReply = "";
|
||||
}
|
||||
}
|
||||
if (params.replyTo)
|
||||
MailReply = params.replyTo
|
||||
|
||||
if (!p_mailto || !MailSender)
|
||||
{
|
||||
@@ -94,7 +87,7 @@ function sendMail( p_mailfrom
|
||||
}
|
||||
else
|
||||
{
|
||||
if (p_body != "")
|
||||
if (p_body)
|
||||
{
|
||||
objMail.TextBody = p_body;
|
||||
if (p_bodyhtml != "")
|
||||
@@ -219,8 +212,8 @@ function sendMail( p_mailfrom
|
||||
objMail.From = MailSender;
|
||||
objMail.ReplyTo = MailReply;
|
||||
objMail.To = p_mailto;
|
||||
objMail.CC = p_cc;
|
||||
objMail.BCC = p_bcc;
|
||||
objMail.CC = params.cc || "";
|
||||
objMail.BCC = params.bcc || "";
|
||||
objMail.subject = p_subject;
|
||||
//
|
||||
if (params.attachStream)
|
||||
@@ -242,11 +235,11 @@ function sendMail( p_mailfrom
|
||||
}
|
||||
}
|
||||
|
||||
if (p_receiptto != "")
|
||||
if (params.receiptto)
|
||||
{
|
||||
// ontvangst bevestiging vragen en versturen naar dit adres
|
||||
objMail.Fields("urn:schemas:mailheader:disposition-notification-to").Value = p_receiptto;
|
||||
objMail.Fields("urn:schemas:mailheader:return-receipt-to").Value = p_receiptto;
|
||||
objMail.Fields("urn:schemas:mailheader:disposition-notification-to").Value = params.receiptto;
|
||||
objMail.Fields("urn:schemas:mailheader:return-receipt-to").Value = params.receiptto;
|
||||
objMail.Fields.Update();
|
||||
}
|
||||
|
||||
|
||||
@@ -71,10 +71,8 @@ function sendSMS( p_telnr
|
||||
+ escape(p_msg) + "\n";
|
||||
sendMail( S("puo_fromaddress")
|
||||
, S("puo_smsaccount")
|
||||
, "", "", ""
|
||||
, "Bericht per SMS verzonden aan " + p_telnr
|
||||
, body
|
||||
, ""
|
||||
);
|
||||
SMSsend = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user