Subject: ASP
Posted By: pawan.shukla Post Date: 10/3/2005 5:24:08 PM
I am creating a mail page.I want that when user send mail with message
,a   URL link of my site will pass to reciver.
If any body no then help me with code.

Reply By: Steven Reply Date: 10/4/2005 12:24:59 AM
It would depend on what you've got access to.
For example, you could use CDO, such as:
Function SendCDOEmail(sTo, sFrom, sSubject, sAttach)

Dim iMsg
Dim iConf
Set iMsg = Server.CreateObject("CDO.Message")
Set iConf = Server.CreateObject("CDO.Configuration")
With iMsg
    Set .Configuration = iConf
    .CreateMHTMLBody(sAttach)
    .To = sTo
    .From = sFrom
    .Subject = sSubject
    .Send
End With
End Function


Or you could use CDONTS, such as:
Function SendCDONTSEmail(sTo, sFrom, sSubject, sBody, sAttach)
Dim objCDO

'Create a new CDO objects
Set objCDO = Server.CreateObject("CDONTS.NewMail")

'Enter the sender's email address 
objCDO.To = sTo

'Enter the recipients of this email, use ; to separate the addresses
objCDO.From = sFrom

'Enter the subject of this email
objCDO.Subject = sSubject


objCDO.BodyFormat = 0 'CdoBodyFormatHTML
objCDO.MailFormat = 0 'CdoMailFormatMime

objCDO.AddAttachment(sAttach)

'Enter the body text of the message
objCDO.Body = sBody

'Send the email!
objCDO.Send

'Release the object 
set objCDO=nothing
End Function



I am a loud man with a very large hat. This means I am in charge

Go to topic 35361

Return to index page 460
Return to index page 459
Return to index page 458
Return to index page 457
Return to index page 456
Return to index page 455
Return to index page 454
Return to index page 453
Return to index page 452
Return to index page 451