Solved

Sending e-mail with CDOSYS

Posted on 2012-04-04
4
413 Views
Last Modified: 2012-04-07
I found this code on the page

http://www.w3schools.com/asp/asp_send_email.asp


Sending an HTML e-mail that sends a webpage from a website:

<%
Set myMail=CreateObject("CDO.Message")
myMail.Subject="Sending email with CDO"
myMail.From="mymail@mydomain.com"
myMail.To="someone@somedomain.com"
myMail.CreateMHTMLBody "http://www.w3schools.com/asp/"
myMail.Send
set myMail=nothing
%>

I cannot see how this can send as it does not have a button and I do not understand the line myMail.CreateMHTMLBody "http://www.w3schools.com/asp/"

Can anyone explain how this functions please.

Thanks

John
0
Comment
Question by:johnhardy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 29

Expert Comment

by:Paul Jackson
ID: 37806131
The code is server-side code that will execute on the server-side as soon as the page it is on is loaded so it doesn't need a button.

The CreateMHTMLBody line will just take the specified webpage and convert into a format that can be sent as an email body.

http://msdn.microsoft.com/en-us/library/ms527024(v=exchg.10).aspx
0
 

Author Comment

by:johnhardy
ID: 37806281
I was hoping to have a webpage where some entries can be made.

This would seem not to do this?
0
 
LVL 29

Accepted Solution

by:
Paul Jackson earned 500 total points
ID: 37806341
0
 

Author Closing Comment

by:johnhardy
ID: 37819737
Many thanks
excellent
Regards

John
0

Featured Post

Increase your protection from Zero Day threats!

Running two Antivirus' is never a good idea.
Taking advantage of Multiple Security layers on the other hand can often save your hide.
See which top notch security software brands have been proven to happily coexist together.
Reduce your chances of becoming a statistic.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question