Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old January 12th, 2007, 04:59 AM
Authorized User
 
Join Date: Oct 2006
Location: , , .
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.

Reply With Quote
  #2 (permalink)  
Old January 12th, 2007, 08:35 AM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
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
Reply With Quote
  #3 (permalink)  
Old January 12th, 2007, 05:46 PM
Authorized User
 
Join Date: Oct 2006
Location: , , .
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.

Reply With Quote
  #4 (permalink)  
Old January 13th, 2007, 08:38 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
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--------------------------
-----------------------------------------------------------
Reply With Quote
  #5 (permalink)  
Old January 18th, 2007, 09:35 AM
Authorized User
 
Join Date: Oct 2006
Location: , , .
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?

Reply With Quote
  #6 (permalink)  
Old January 18th, 2007, 09:49 AM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
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
================================================== =========
Reply With Quote
  #7 (permalink)  
Old January 27th, 2007, 07:04 PM
Friend of Wrox
 
Join Date: May 2005
Location: , , Norway.
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!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 01:39 PM
CDO email - character 1023 drops out! BananaJim Classic ASP Professional 1 January 10th, 2007 04:06 PM
Sending Email from ADP using CDO Scripts82 Access VBA 2 March 29th, 2006 09:50 AM



All times are GMT -4. The time now is 04:18 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.