Jump to content
Sign in to follow this  
dwicemerlang

Bagaimana Nak Tambah Satu Lagi Email Dalam Feedback Form

Recommended Posts

Assalamualaikum wbt.

Kepada otai2 semua, aku nak minta tolong korang bgtau kat baris mana aku nak insert email kedua aku dlm script di bawah. Tujuannya bila ada pelawat yg isi feedback form aku dlm laman web aku akan terima pada kedua2 email aku. Existing email aku dlm script tu sekarang adalah : [email="[email protected]"][email protected][/email]. So sekarang aku nak tambah satu lagi email yahoo iaitu: [email="[email protected]"][email protected][/email]. Boleh sapa2 tolong tak. ok dibawah ni disertakan script untuk mengerakkan feedback form aku:

<%
'Use the CDOSYS component
sch = "[url="http://schemas.microsoft.com/cdo/configuration/"]http://schemas.micro.../configuration/[/url]" 'new
Set cdoConfig = Server.CreateObject("CDO.Configuration") 'new
With cdoConfig.Fields 'new
.Item(sch & "sendusing") = 2 ' cdoSendUsingPort 'new
.Item(sch & "smtpserver") = "mail.dwicemerlang.com" 'new (add your smtp server address here
.update 'new
End With 'new
'Declare variables
Dim emailBody
Dim emailTo
Dim emailFrom
Dim emailSubject
Dim emailCC
Dim emailBCC
'this script get the values from the calling page and then compose the data into a email
'to be sent to email processing script

Company = Request("company")
Contact_Person = Request("name")
Position = Request("position")
Telephone = Request("tel")
Fax = Request("fax")
Email = Request("email")
Enquiry = Request("enquiry")

'composing the email to be sent to SendEmail function
emailBody = "<b>Enquirer Form Details</b><br>" _
& "Company: <b>" & Company & "</b><br>" _
& "Contact Person: <b>" & Contact_Person & "</b><br>" _
& "Position: <b>" & Position & "</b><br>" _
& "Tel: <b>" & Telephone & "</b><br>" _
& "Fax: <b>" & Fax & "</b><br>" _
& "E-mail: <b>" & Email & "</b><br>" _
& "<br>" _
& "Enquiry: <b>" & Enquiry & "</b><br>"

emailTo = "[email="[email protected]"][email protected][/email]"
emailFrom = Email
emailBCC = ""
emailCC = ""
emailSubject = "Feedback from DWICEMERLANG Website"

Set objMail = Server.CreateObject("CDO.Message")
Set objMail.Configuration = cdoConfig 'new
objMail.HTMLBody = 0
objMail.From = emailFrom
objMail.To = emailTo
objMail.BCC = emailBCC
objMail.CC = emailCC
objMail.Subject = emailSubject
objMail.HTMLBody = emailBody
objMail.Send
Set objMail = Nothing
Set cdoConfig = Nothing 'new
%>
<!-- #include file="thankyou.html" -->

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...