Ir para conteúdo
Fórum Script Brasil
  • 0

Cdonts Configuração.


ratocuiara

Pergunta

Olá pessoal, peguei esse código de um site pronto de cadastro, e estou fuçando para aprender um pouquinho.

Gostaria que vocês configurassem o codigo a seguir, para envio de email do localhost.

'Email Notification for Fogotten Password User

'Need Modification Here

'Sorry, Brinkster Free User Cannot User This Facility

strMailComponent = rsCommon("MailComponent")  'Default Dimac w3 Jmail Component

'strMailComponent = "CDONTS" 'Incase your Web is on Windows NT, 2000, 2003 AS OR using CDONTS

'strMailComponent = "CDOSYS" 'Incase You are Using CDOSYS

'strMailComponent = "Jmail"  'Dimac Jmail Component

'strMailComponent = "AspEmail" 'Incase You are Using AspEmail

'strMailComponent = "AspMail" 'Incase You are Using AspMail

'strMailComponent = "NOMAIL" 'Incase You Donot Have Mail Component Less Secure

'---------------------------------------------------------------------------------------------------------------------------------------------

'Need Modification Here

'Set Email Options Here

strWebsiteName = rsCommon("Website_name")

strForumEmailAddress = rsCommon("WebMaster_email")

strSubject = "Your Temporary Password For " & strWebsiteName &""

strIncomingMailServer = rsCommon("MailServer") 'Mail Server Name SMTP like mail.yahoo.com

strMailPath = rsCommon("Site_Path") 'Path of Your WebSite like http://www.us.yahoo.com/login

'--------------------------------------------------------------------------------------------------------------------------------------------

rsCommon.Close

'Function to send an e-mail

Function SendMail(ByVal strEmailBodyMessage, ByVal strRecipientName, ByVal strRecipientEmailAddress, ByVal strFromEmailName, ByVal strFromEmailAddress, ByVal strSubject, strMailComponent, blnHTML)

'Dimension variables

Dim objCDOSYSMail  'Holds the CDOSYS mail object

Dim objCDOMail  'Holds the CDONTS mail object

Dim objJMail  'Holds the Jmail object

Dim objAspEmail  'Holds the Persits AspEmail email object

Dim objAspMail  'Holds the Server Objects AspMail email object

Dim strEmailBodyAppendMessage 'Holds the appended email message

'******************************************

  '***    MS CDONTS mail component    ****

  '******************************************

  'CDONTS mail component

  Case "CDONTS"

  'Create the e-mail server object

  Set objCDOMail = Server.CreateObject("CDONTS.NewMail")

  With objCDOMail

    'Who the e-mail is from

    .From = strFromEmailName & " <" & strFromEmailAddress & ">"

    'Who the e-mail is sent to

    .To = strRecipientName & " <" & strRecipientEmailAddress & ">"

    'The subject of the e-mail

    .Subject = strSubject

    'The main body of the e-amil

    .Body = strEmailBodyMessage & strEmailBodyAppendMessage

    'Set the e-mail body format (0=HTML 1=Text)

    If blnHTML = True Then

    .BodyFormat = 0

    Else

    .BodyFormat = 1

    End If

    'Set the mail format (0=MIME 1=Text)

    .MailFormat = 0

    'Importance of the e-mail (0=Low, 1=Normal, 2=High)

    .Importance = 1

    'Send the e-mail

    .Send

  End With

  'Close the server mail object

  Set objCDOMail = Nothing

abraços

cada dia que passa aprendo e resolvo alguns pepinos em asp, logo me sinto o melhor o tal, mas nem chego aos pés de vocês, que alem do saber tem humildade em compartilhar.

É por isso que ainda acredito no ser humano e faço minha parte respondendo duvidas de CorelDraw. Haaaa nisso eu sou bão

Link para o comentário
Compartilhar em outros sites

3 respostass a esta questão

Posts Recomendados

Visitante
Este tópico está impedido de receber novos posts.


  • Estatísticas dos Fóruns

    • Tópicos
      152,3k
    • Posts
      652,3k
×
×
  • Criar Novo...