Link to home
Start Free TrialLog in
Avatar of ylucki
ylucki

asked on

automatic mail when a page is downloaded


Hi,

Can someone please help me with the sample code, to automatically send a mail to say lucky@yahoo.com, when some software is downloaded from my webpage ?

There will be a download link in my webpage, and when a user downloads the software, i have to get a mail indication automatically with from the user's mail configured on the machine.

Thanks,
Lucky
Avatar of apresto
apresto
Flag of Italy image

<%
Set myMail=CreateObject("CDO.Message")
myMail.Subject="Sending email with CDO"
myMail.From=username 'This is a variable
myMail.To="Lucky@yahoo.com"
myMail.TextBody="You message."
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing")=2
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") ="smtp.server.com" 'Name or IP of remote SMTP server
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") =25   'Server port
myMail.Configuration.Fields.Update
%>

...

<a href="file.exe" onclick="<%=myMail.Send%>">

The above is how to csend a mail from an ASP page using CDO

CDO is used for win 2000 or later, CDONTS is used for WinNT.  Im not too sure about the link though, not sure if that will send but where code is there, to send mail all you need to do is execute the myMail.send object
ASKER CERTIFIED SOLUTION
Avatar of COBOLdinosaur
COBOLdinosaur
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Leon Fester
Leon Fester
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sanctify
sanctify

before i hash code for you, what is the capabilities of your web server ?

does your accoutn support server side scripting or jsut htmp and client side active scripting ? ?

oh and there is no way you can send email from a client users machine