When I click "save" after adding a new record (which contains, among other
fields, the person's email address), I want an email to automatically be sent
to that person (at the email that is in the field of that record). How can I
do this?
Thanks so much, it really means so much to me!!!
--
Message posted via WebmasterKB.com
http://www.webmasterkb.com/Uwe/Forums.aspx/asp/200710/1
Re: Generate email when I click button?
am 11.10.2007 23:12:46 von McKirahan
"majahops via WebmasterKB.com" wrote in message
news:798bc3f05f9b3@uwe...
> When I click "save" after adding a new record (which contains, among other
> fields, the person's email address), I want an email to automatically be
sent
> to that person (at the email that is in the field of that record). How can
I
> do this?
What does your Web host support?
Perhaps, CDO.Message or ASPMail.
Re: Generate email when I click button?
am 11.10.2007 23:59:10 von u37541
First off, thank you SO much for responding - it mean's a lot to me - i've
been trying to get this done forever.
So I have godaddy.com. When I look up what they support, I get the following:
CDO.MESSAGE
CDONTS.NewMail
I'm assuming that means that godaddy.com supports CDO.Message.
Thank you so so so so so much again. My heart skipped a beat when I saw that
somebody had finally [at least tried] to answer my cries for help.
Tim
McKirahan wrote:
>> When I click "save" after adding a new record (which contains, among other
>> fields, the person's email address), I want an email to automatically be sent
>> to that person (at the email that is in the field of that record). How can I
>> do this?
>
>What does your Web host support?
>Perhaps, CDO.Message or ASPMail.
--
Message posted via WebmasterKB.com
http://www.webmasterkb.com/Uwe/Forums.aspx/asp/200710/1
Re: Generate email when I click button?
am 12.10.2007 01:08:07 von McKirahan
"majahops via WebmasterKB.com" wrote in message
news:798cc27bb482e@uwe...
> First off, thank you SO much for responding - it mean's a lot to me - i've
> been trying to get this done forever.
>
> So I have godaddy.com. When I look up what they support, I get the
following:
>
>
> CDO.MESSAGE
> CDONTS.NewMail
>
> I'm assuming that means that godaddy.com supports CDO.Message.
[snip]
Try this; watch for word-wrap.
The Response.Write() statement invokes the function;
modify it to suit your needs. Just call the function by
passing in 3 parms: email address, subject, and body.
The value of "cHST" (Host) is what GoDaddy requires.
The value of "cFRM" (From) is your email address.
Suucess/failure reporting has been commented out as
you may want to log the results rather than display them.
E-mail has been sent.")
' Else
' Response.Write(" Sub Email()")
' Response.Write(" CDO Failed: " & Err.Description)
' Response.Write(" CDO 'Addr': " & sAddr)
' Response.Write(" CDO 'Subj': " & sSubj)
' Response.Write(" CDO 'Body': " & sBody)
' End If
Set objCDO = Nothing
Set objCFG = Nothing
'*
'* Return
'*
On Error GoTo 0
Email = True
End Function
%>
Re: Generate email when I click button?
am 12.10.2007 01:12:12 von u37541
McKirahan,
Before I do this, where do I put all of this text? That has been one of the
things that is unclear to me. Do I put it next to the like where the save-
button is in the html, or what? Thanks so much again!
McKirahan wrote:
>> First off, thank you SO much for responding - it mean's a lot to me - i've
>> been trying to get this done forever.
>[quoted text clipped - 5 lines]
>>
>> I'm assuming that means that godaddy.com supports CDO.Message.
>
>[snip]
>
>Try this; watch for word-wrap.
>
>The Response.Write() statement invokes the function;
>modify it to suit your needs. Just call the function by
>passing in 3 parms: email address, subject, and body.
>
>The value of "cHST" (Host) is what GoDaddy requires.
>The value of "cFRM" (From) is your email address.
>
>Suucess/failure reporting has been commented out as
>you may want to log the results rather than display them.
>
><%@ Language="VBScript" %>
><% Option Explicit
>
>Response.Write("Email = " & Email("news@mckirahan.com","Test","Test!"))
>
>Function Email(sAddr,sSubj,sBody)
> Email = False
> On Error Resume Next
> '*
> '* Declare Constants
> '*
> Const cCDO = "http://schemas.microsoft.com/cdo/configuration/"
> Const cHST = "relay-hosting.secureserver.net"
> Const cFRM = "postmaster@{your~domain.com}"
> '*
> '* Send Email
> '*
> Dim objCFG
> Set objCFG = Server.CreateObject("CDO.Configuration")
> objCFG.Fields.Item(cCDO & "sendusing") = 2
> objCFG.Fields.Item(cCDO & "smtpserver") = cHST
> objCFG.Fields.Item(cCDO & "smtpserverport") = 25
> objCFG.Fields.Update
> Dim objCDO
> Set objCDO = Server.CreateObject("CDO.Message")
> objCDO.From = cFRM
> objCDO.To = sAddr
> 'objCDO.BCC = ""
> 'objCDO.CC = ""
> objCDO.Subject = sSubj
> objCDO.TextBody = sBody
> 'objCDO.HTMLBody = sBody
> 'objCDO.AddAttachment = ""
> objCDO.Configuration = objCFG
> objCDO.Send
>' If Err = 0 Then
>' Response.Write("
E-mail has been sent.")
>' Else
>' Response.Write(" Sub Email()")
>' Response.Write(" CDO Failed: " & Err.Description)
>' Response.Write(" CDO 'Addr': " & sAddr)
>' Response.Write(" CDO 'Subj': " & sSubj)
>' Response.Write(" CDO 'Body': " & sBody)
>' End If
> Set objCDO = Nothing
> Set objCFG = Nothing
> '*
> '* Return
> '*
> On Error GoTo 0
> Email = True
>End Function
>%>
--
Message posted via WebmasterKB.com
http://www.webmasterkb.com/Uwe/Forums.aspx/asp/200710/1
Re: Generate email when I click button?
am 12.10.2007 01:15:24 von u37541
Here is the area of html around the save button (plus some more)...where
would i put the part you gave me into this? Thanks so much again!!!