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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

e-mail notification feature...

Status
Not open for further replies.

DREAMaker

Programmer
Oct 7, 2000
7
IT
Very interesting the e-mail notification for the messages you post in the forum... Anybody know how to realize this feature? [sig][/sig]
 
Well this is a psuedo approach.
When the form recieves a Final Submit then get the e-mial address of the person who posted the original message and use this Mail code as a start.

<% ' Email results to poster
Set Mail2 = Server.CreateObject(&quot;Persits.MailSender&quot;)
Mail2.Host = &quot;smtp.yoursite.com&quot; ' Specify a valid SMTP server
Mail2.From = Email_of_Poster ' Specify sender's address
Mail2.FromName = Name_of_Poster ' Specify sender's name

Mail2.AddAddress &quot;partssales@universal1.com&quot;
'Mail2.AddAddress &quot;dposton@ij.net&quot;

Mail2.Subject = &quot;Reply form your Site&quot;
msg = Name_of_submitter & &quot; has posted a response to your &quot; & Subject_of_Current_Post
Mail2.Body = msg
On Error Resume Next
Mail2.Send
If Err <> 0 Then
Response.Write &quot;Error encountered: &quot; & Err.Description
End If
%>

Note: this assumes your site is using &quot;Persists&quot; E-mail.
I cut this code out of a submit form we are using right now its not doing exacly what you are but [sig]<p>DougP, MCP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br> Ask me how Bar-codes can help you be more productive.[/sig]
 
You can also try CDONTS which is usually included in the standard installation of IIS. Here's a very simple usage of it:

set mailObj = server.createObject(&quot;CDONTS.Newmail&quot;)
mailObj.TO = &quot;billy@bbbusiness.com&quot;
mailObj.FROM = &quot;info@asdf.com&quot;
mailObj.BODY = &quot;hello billy&quot;
mailObj.send

So basically you create a newmail object, add your parameters, then call the object's send method. [sig]<p>--Will Duty<br><a href=mailto:wduty@radicalfringe.com>wduty@radicalfringe.com</a><br><a href= > </a><br> [/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top