Wrox Programmer Forums
|
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 12th, 2007, 05:59 AM
Authorized User
 
Join Date: Oct 2006
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default CDO email

I am sending (successfully) email using CDO within my ASP application, as follows:

----------------------------

    myMail.HTMLBody = eText

    with myMail
        .Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
        .Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.xxxxx.com"
        .Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
        .Configuration.Fields.Update
    end with

    myMail.Send

-------------------------------

This works on my development server, and xxxxx is my domain name.

The question is:

My client will view the application on my development server. Can I make it so that the email will originate with them? (i.e. info@cccccc.com where cccccc is their domain).

I realise that when the application is transferred to their server, it will possible to change the smtpserver setting to smtp.ccccc.com, but at this development stage I want to keep the application on my development server but still have the emails originate with them.

Can this be done?

Thanks.

 
Old January 12th, 2007, 09:35 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

As long as you can hit their SMTP box from your Dev Server, yes you should be able to do this. If their mail server is setup correctly though, you will not only need to change the server name but also provide a valid email account that exists on their box to send the email. Otherwise, if you could have anything in the From field, their mail server would be setup as an Open Relay which means anyone could use it to Spam through.

hth.

-------------------------
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.

^^Thats my signature
 
Old January 12th, 2007, 06:46 PM
Authorized User
 
Join Date: Oct 2006
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default

"As long as you can hit their SMTP box from your Dev Server"

Please can you tell me what you mean by this?

Also, what do you mean by "change the server name"?

Thanks.

 
Old January 13th, 2007, 09:38 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

By "hit their SMTP Server" I mean that your dev box must have a connection to the internet to be able to access a remote SMTP server. By changing the server name I mean that if in code your dev SMTP server is setup as

mail.development.com

you will need to change it to

mail.clientsdomain.com

-----------------------------------------------------------
I will only tell you how to do it, not do it for you.------------
Unless, of course, you want to hire me to do work for you.---
^^Thats my signature--------------------------------------
-----------------------------------------------------------
http://www.catb.org/~esr/faqs/smart-questions.html -------
^^Took that from planoie's profile--------------------------
-----------------------------------------------------------
 
Old January 18th, 2007, 10:35 AM
Authorized User
 
Join Date: Oct 2006
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default

From what you are saying, it seems I could write an application that sits on my dev box and sends any email anywhere I like that comes from some other company's account (assuming I know at least one valid address of that company, e.g. info@). Surely I ought not to be able to do this, as I could reak havoc for that company!!! Have I misunderstood something?

 
Old January 18th, 2007, 10:49 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Conceivably, you can. What it depends on is if the SMTP server you are trying to send email through requires authentication or not. Some SMTP servers will allow you to send email to all of the accounts contained within itself without requiring authentication, however, when you try to pass an email to another domain (you are using this SMTP box as a relay at this point) it will require you to authenticate.

================================================== =========
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.
================================================== =========
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile
================================================== =========
 
Old January 27th, 2007, 08:04 PM
Friend of Wrox
 
Join Date: May 2005
Posts: 189
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hei!
BananaJim, can you please tell me how to send cdo mail from my asp-app using winxp? Is the code you have posted all there is? Thank you for any help.

Mvh Beginning ASP
grstad :~)



Internet has become favorable with that tool...thank you Tim Berners-Lee!





Similar Threads
Thread Thread Starter Forum Replies Last Post
CDO email - missing characters BananaJim Classic ASP Professional 3 May 2nd, 2007 10:31 AM
CDO Email error Treefarn Classic ASP Professional 10 February 20th, 2007 02:39 PM
CDO email - character 1023 drops out! BananaJim Classic ASP Professional 1 January 10th, 2007 05:06 PM
Sending Email from ADP using CDO Scripts82 Access VBA 2 March 29th, 2006 10:50 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.