Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2004

    Unanswered: CDO Component without EmailID in "From" field

    We are having number of sites running.

    So far our sites were running on Windows NT Operating system.

    We used ASP for building our sites.

    We have used CDONTS component in our sites ASP pages for sending mails to our clients in many occasions. At some occasions we do not want our client to send emails to the mail received from us. Hence we have specified text without an email id for the "From" field.

    Now we are converting our server to Windows 2003 Server. We are using CDO component in our sites ASP pages for sending mails in our new server as CDONTS component does not work in Windows 2003.

    We have the following problem:

    We are unable to send emails without an email id in the "From" field which was possible in CDONTS.

    Could anyone help us out to resolve this issue?

    Thanks in Advance.


  2. #2
    Join Date
    Mar 2004
    I got the solution in some other site. With the following procedure I am able to send emails without email id in the "From" field.

    Sub SendMailCDO(aTo, Subject, HTMLBody, aFrom)
    Const cdoOutlookExvbsss = 2
    Const cdoIIS = 1

    'Create CDO message object
    Set Message = CreateObject("CDO.Message")
    With Message
    'Load IIS configuration
    .Configuration.Load cdoIIS

    'Set email adress, subject And body
    .To = aTo
    .Subject = Subject
    .HTMLBody = HTMLBody

    'Set sender address If specified.
    If Len(aFrom) > 0 Then .From = aFrom

    'Send the message
    End With
    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts