slaugier
7 years agoOccasional Contributor
Everytime I send an e-mail I have a smart card windows prompt
Hi
I recently needed to install a smart card reader for another project.
And now, everytime, I use the sendmail function, I get a windows security prompt saying "connect a smart card".
The only way to use the function to send email now is to have the smart card reader connected, which is very inconvenient. I use CDO to send mail.
The prompt appears when mMessage.Send() is being processed in this function :
function SendEmail(mFrom, mTo, mSubject, mBody, mAttach)
{
var schema, mConfig, mMessage;
schema = "http://schemas.microsoft.com/cdo/configuration/";
mConfig = getActiveXObject("CDO.Configuration");
mConfig.Fields.$set("Item", schema + "sendusing", 2); // cdoSendUsingPort
mConfig.Fields.$set("Item", schema + "smtpserver", "smtp.office365.com");
mConfig.Fields.$set("Item", schema + "smtpserverport", 25);
mConfig.Fields.$set("Item", schema + "smtpauthenticate", 1); // Authentication mechanism
mConfig.Fields.$set("Item", schema + "sendusername", "my_email_adress.com");
mConfig.Fields.$set("Item", schema + "sendpassword", "***");
mConfig.Fields.$set("Item", schema + "smtpusessl", true);
mConfig.Fields.Update();
mMessage = getActiveXObject("CDO.Message");
mMessage.Configuration = mConfig;
mMessage.From = mFrom;
mMessage.To = mTo;
mMessage.Subject = mSubject;
mMessage.HTMLBody = mBody;
//mMessage.HTMLBody.Charset = "utf-8";
if (mAttach != undefined)
{
mMessage.AddAttachment(mAttach);
} else
{
mAttach = "";
}
mMessage.Send();
Log.Message("Message to <" + mTo + "> was successfully sent");
return true;
}
Do you have any idea to solve this problem?
I don't have the prompt anymore : I had to delete My personal certificates.
Use certmgr.msc in cmd prompt
Go to Personal/Certificates
And delete those which makes trouble
Hope it will help someone one day
Sylvain