CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 send email on AfterInsert event

Print topic Send  topic

Author Message
rlane313
Posted: 10/23/2007, 5:28 AM

Hello,
I have a customer feedback form that I want to automatically send out an
email to managers with the content of the feedback submission in the body of
the email. The web hosting company only has cdosys available. This site is
in ASP. I am using CodeCharge Studio version 2.3.2.28. I have tried the
built-in send mail and I cannot get it to work. So I created a custom code
to accomplish this.

This is what I have so far and it works well. I want to add the data from
the form submisssion into the email body.

Function Feedback_AfterInsert() 'Feedback_AfterInsert @4-62266B6B

'Custom Code @24-73254650
' -------------------------
dim sEmail, sMessage
dim oCdoMail, oCdoConf, sConfURL


Set oCdoMail = Server.CreateObject("CDO.Message")
Set oCdoConf = Server.CreateObject("CDO.Configuration")
sEmail = "managersemail@formsite.com"
sMessage = "View details at:
http://www.tiresplus.biz/Admin/AdmFeedback.asp";

sConfURL = "http://schemas.microsoft.com/cdo/configuration/"

with oCdoConf
.Fields.Item(sConfURL & "sendusing") = 2
.Fields.Item(sConfURL & "smtpserver") = "localhost"
.Fields.Item(sConfURL & "smtpserverport") = 25
.Fields.Update
end with

with oCdoMail
.From = "performancereport@formsite.com"
.To = sEmail
.cc = "myemail@formsite.com"
.Subject = "New Guest Performance Report"
.TextBody = sMessage
.HTMLBody = sMessage
.Configuration = oCdoConf
.Send
end with

Set oCdoConf = Nothing
Set oCdoMail = Nothing
' -------------------------
'End Custom Code

End Function 'Close Feedback_AfterInsert @4-54C34B28

rlane313
Posted: 10/23/2007, 5:34 AM

Sorry,
My goals:
the message works fine here but I want to add the content of the form data
that was just submitted to the database into the body of the email message.
I don't know how to access that from the codecharge form.
Can anyone help please?
Am I making myself understood?

Randy


"rlane313" <randy@lanestuff.com> wrote in message
news:ffkpd3$940$1@news.codecharge.com...
> Hello,
> I have a customer feedback form that I want to automatically send out an
> email to managers with the content of the feedback submission in the body
of
> the email. The web hosting company only has cdosys available. This site is
> in ASP. I am using CodeCharge Studio version 2.3.2.28. I have tried the
> built-in send mail and I cannot get it to work. So I created a custom code
> to accomplish this.
>
> This is what I have so far and it works well. I want to add the data from
> the form submisssion into the email body.
>
> Function Feedback_AfterInsert() 'Feedback_AfterInsert @4-62266B6B
>
> 'Custom Code @24-73254650
> ' -------------------------
> dim sEmail, sMessage
> dim oCdoMail, oCdoConf, sConfURL
>
>
> Set oCdoMail = Server.CreateObject("CDO.Message")
> Set oCdoConf = Server.CreateObject("CDO.Configuration")
> sEmail = "managersemail@formsite.com"
> sMessage = "View details at:
> http://www.tiresplus.biz/Admin/AdmFeedback.asp";
>
> sConfURL = "http://schemas.microsoft.com/cdo/configuration/"
>
> with oCdoConf
> .Fields.Item(sConfURL & "sendusing") = 2
> .Fields.Item(sConfURL & "smtpserver") = "localhost"
> .Fields.Item(sConfURL & "smtpserverport") = 25
> .Fields.Update
> end with
>
> with oCdoMail
> .From = "performancereport@formsite.com"
> .To = sEmail
> .cc = "myemail@formsite.com"
> .Subject = "New Guest Performance Report"
> .TextBody = sMessage
> .HTMLBody = sMessage
> .Configuration = oCdoConf
> .Send
> end with
>
> Set oCdoConf = Nothing
> Set oCdoMail = Nothing
> ' -------------------------
> 'End Custom Code
>
> End Function 'Close Feedback_AfterInsert @4-54C34B28
>
>


Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.