generate verification code and send to email
Wed May 08 2024 13:40:02 GMT+0000 (Coordinated Universal Time)
Saved by
@nishpod
//GenCode
myList = {0,1,2,3,4,5,6,7,8,9,10};
passString = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
newList = "";
//
for each index i in myList
{
randnum = randomNumber(1,62);
newList = newList + substring(passString,randnum,randnum + 1);
}
verify = replaceAll(newList,",","");
input.GenCode = verify;
//Send email
sendmail
[
from :"noreply@podmanagement.co.uk"
to :input.Email
subject :"POD Management Work Order Master [Verification Code]"
message :"<div>Please use the following code to access the report.</div><div><br></div><div><b><span class=\"size\" style=\"font-size: 18.666666666666664px\">" + verify + "<br></span></b><br></div><div><br></div><div><span class=\"size\" style=\"font-size: 13.333333333333332px\">Regards,</span><span class=\"size\" style=\"font-size: 13.333333333333332px\"><br></span></div><div><span class=\"size\" style=\"font-size: 13.333333333333332px\"><br></span></div><div><span class=\"size\" style=\"font-size: 13.333333333333332px\">POD Management Team</span><br></div>"
]
content_copyCOPY
Comments