We help IT Professionals succeed at work.

Change return path of emails sent using cdosys

Firewater
Firewater asked
on
1,904 Views
Last Modified: 2012-06-22
Hi
 
I have a problem that has been gnawing at my soul for the last two weeks and I have searched everywhere for the solution but to no avail.
I need the return path to be changed on a cdosys emailer ie.
 
Website sends out the email ---->return address is the From address that I use in my vbscript which belongs to my client, I need this to change for emails that get bounced back only.

                                           ______>Client Sends email (cdosys)
                                           |            |                                 |
    Return path stays              |            |                                 |
    clients email                     |            |                                 |
                                           |       Successfull                Unsuccessfull
                                           |_______|                                 |
                                                                                           |
                                                                                           |___________> Return path changes to my email Address

 
Is there a schema that I can use to change the return path?
If not is there a way to do this?

I need solutions in asp vbscript!
 
Please help me because I am at my wits end.
Thnks for reading
Comment
Watch Question

Commented:
Hi,
This might work  if you are CDONTS.Newmail.

objMail.Value("Reply-To") = "return@yourmail.com"

Rgds
V

Author

Commented:
Thanks but i need CDOSYS
It may have something to do with Schemas I think!
Try this code:

<%
Sub SendMail(SendTo,From,ReplyTo,Subject,Body,Attachments,Format)
'### Defines which email component to use.
MailComponent="cdosys"
'### SMTP Mailserver to be used to send account information to users.
MailServer="mail.server.com"

If LCase(MailComponent="cdosys") Then
   Set Msg = Server.CreateObject("CDO.Message")
   Msg.From = From
   Msg.Value("Reply-To") = ReplyTo
   Msg.To = SendTo
   Msg.Subject =Subject
   Msg.TextBody = Body

   if Format="html" Then
   Msg.BodyFormat=0
   Msg.MailFormat=0
   end if

   If IsArray(Attachments) Then
      For i = 0 To Ubound(Attachments)
         Msg.AddAttachment AttachPath & Attachments(i)
      Next
   End If
   Msg.Send()
   Set Msg = Nothing
End if

End Sub
%>

Author

Commented:
This is the basic version - I want to find out how to use the schemas / get a return-path

Author

Commented:
This is the basic version - I want to find out how to use the schemas / get a return-path
Could you please elaborate what you want? I dont understand what your requirement is or what do you mean by basic version. I do not understand why you need schemas here. All you need to do is add something like
     cdoMessage.ReplyTo = replyTo
or
     Msg.Value("Reply-To") = replyTo
to your code. Thanks.

Author

Commented:
The return path, sender and from are all different fields that need to be set in the header.

I found this article which answers my question:
https://www.experts-exchange.com/Web/Web_Languages/ASP/Q_21006255.html?query=cdosys+return+path&clearTAFilter=true

Thank you
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.