Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending E-mail

Status
Not open for further replies.

dcarbone

Programmer
Aug 22, 2003
29
CA
Does anyone know where i can find an asp script to send out e-mails
 
Code:
' Send email
   Set objMail  = Server.CreateObject("CDONTS.NewMail")
   with objMail
                .From = "me@mydomain.com"
                .To   = "you@yourdomain.org"
                .Subject = "An email!" 
   
   'create html email
   note = "You've just received an email from me."

   
   HTML = HTML & &quot;<HTML>&quot;
   HTML = HTML & &quot;<HEAD>&quot;
   HTML = HTML & &quot;<TITLE>A little something</TITLE>&quot;
   HTML = HTML & &quot;</HEAD>&quot;
   HTML = HTML & &quot;<BODY  bgcolor=&quot;&quot;#FEECCB&quot;&quot;>&quot;
   HTML = HTML & &quot;<CENTER>&quot; & note
   HTML = HTML & &quot;<BR><BR>&quot;
   HTML = HTML & &quot;</BODY>&quot;
   HTML = HTML & &quot;</HTML>&quot;
   
   'you need TO add these lines FOR the mail
   'to be sent in HTML format
   .BodyFormat = 0 
   .MailFormat = 0 

   'Response.Write note  'test to see if the id worked
   .Body = HTML
   .importance = 0 
   .Send 
   
   end with 

Set objMail  = nothing

Bastien

Any one have a techie job in Toronto, I need to work...being laid off sucks!
 
I'm working on &quot;Group Email&quot;. I can email myself and BCC to customers so that they won't see the email addresses of the others.

How can set it up so that all the customers feel like I email directly to them?

Thanks.
 
For now, I just leave the strTo empty and put other email address in strBCC.
 
In the sender line, I want to include my name along with my address. I've tried these:

Kendel &quot;kendel@yahoo.com&quot; and [Kendel] kendel@yahoo.com

but both of them didn't work. Anyone know how???

Thanks.
 
I tried to use CDONTS on my ASP page, and I get the following error message:

Server object error 'ASP 0177 : 800401f3'

Server.CreateObject Failed

/AddUser.asp, line 104

Invalid class string

I asked my IT people and they said well,
&quot;All ASP support CDONTS and our web server supports ASP.&quot;

If it does support it, then why can't I use it??
Is there a way around this??
Thank you for your help.
 
I tried to use ASPMail and SMTPsvg.Mailer
For example:
Set Mailer = Server.CreateObject(&quot;SMTPsvg.Mailer&quot;)
Mailer.FromName = &quot;Webmaster&quot;
Mailer.FromAddress = &quot;me@yahoo.com&quot;
Mailer.RemoteHost = &quot;199.000.000.000&quot;
Mailer.AddRecipient &quot;Me&quot;, &quot;me@yahoo.com&quot;
Mailer.Subject = &quot;Testing&quot;
Mailer.BodyText = &quot;Testing mail&quot;
If Mailer.SendMail then
Response.Write &quot;Mail Sent..&quot;
Else
Response.Write &quot;Mail send failure&quot; & Mailer.Response
End If
Didn't work,
What can I do to get mail component to work???
Thanks again.
 
You might want to try CDONTS

Set objCDOMail = CreateObject(&quot;CDONTS.NewMail&quot;)
objCDOMail.BodyFormat = 0
objCDOMail.MailFormat = 0
objCDOMail.Importance = 2
objCDOMail.From = &quot;me@yahoo.com&quot;
objCDOMail.To = &quot;someone@yahoo.com&quot;
objCDOMail.CC = &quot;CC here&quot;
objCDOMail.BCC = &quot;BCC here&quot;
objCDOMail.Subject = &quot;Testing....&quot;
objCDOMail.Body = &quot;Email body&quot;
objCDOMail.Send
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top