Server.createObject with Persist.Mailsender error

2019-09-08 18:08发布

I am having a problem with this line Set Mail = Server.CreateObject("Persits.MailSender") in my code. This code used to work fine before. All of a sudden it started throwing an error stating the create object failed. Can anyone suggest a work around?

    Set Mail = Server.CreateObject("Persits.MailSender")" 
                ' enter valid SMTP host
    Mail.Host =  "smtpeu1-css.shell.com"
    Mail.From =  "SHIPLocalHost@shell.com"
    Mail.FromName = "SHIPLocalHost@shell.com"

    Mail.AddAddress  defaultTestEmail, defaultTestEmailName
    'If(len(emailCCEmail)>0)Then
        'Mail.AddAddress   defaultTestEmailCC , defaultTestEmailCCName
    'End If
    Mail.Subject = subject
    Mail.IsHTML = True
    'send an email for SSR
    Mail.Body= mailbody
    'Mail.AddAttachment "C:\Apps\SHIP from PROD\ship\ship\UploadedFiles\" & strFileName
    Mail.AddAttachment FilePath
    Mail.Send

0条回答
登录 后发表回答