473,396 Members | 1,755 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

sent email

how to send email to one or two person
this is my code:
please help me to check my code:
<%
SenderName=Request.Form("name")
SenderEmail=Request.Form("email")
SenderPhone=Request.Form("phone")
Sendernote=Request.Form("note")
MailTo = "phuc2583@gmail.com"
mail ="phuchoang@vntinc.com"
note= "Name - " & SenderName
s= "THONG TIN LIEN LAC" & VbCrLf & VbCrLf
s= s& "1. Information:" & VbCrLf
s= s& "Name: " & SenderName & VbCrLf
s= s& "Email: " & SenderEmail & VbCrLf
s= s& "Phone: " & SenderPhone & VbCrLf
s= s& "2. infor:" & VbCrLf
s= s& Sendernote & VbCrLf & VbCrLf
DIM oMail, Flds, oMailConfig
Set oMail = Server.CreateObject("CDO.Message")
Set oMailConfig = CreateObject("CDO.Configuration")
oMailConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost"
oMailConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
oMailConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
oMailConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
oMailConfig.Fields.Update
Set oMail.Configuration = oMailConfig
oMail.From = SenderEmail
oMail.To = MailTo
oMail.To = mail
oMail.Subject= ChuDe
oMail.TextBody = NoiDung
oMail.Send
Set oMail = Nothing
Set oMailConfig = Nothing
%>
when i submit that i don't see email in my box
Feb 26 '08 #1
2 1186
CroCrew
564 Expert 512MB
Hello phuc2583,

Here is an example on how to send to more then one recipient via CDO. You can apply the changes to your code.

Hope this helps~

Expand|Select|Wrap|Line Numbers
  1. <%
  2.     Set myMail = CreateObject("CDO.Message")
  3.     myMail.Subject = "Sending email with CDO"
  4.     myMail.From = "MyMail@MyDomain.com"
  5.     myMail.To = "recipient1@TheirDomain.com;recipient2@TheirDomain.com"
  6.     myMail.TextBody = "This is a message."
  7.     myMail.Send
  8.     set myMail=nothing
  9. %>
  10.  
Feb 26 '08 #2
Thanks so much to your help me.
I have accomplished it
Regards
Hoang Phuc
Feb 27 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Giobibo | last post by:
I use the following code to send e-mails with PHP: if(@mail(....)) { //Send OK } else { //Send Bad } But how can I verify that a message was really sent (in case of "Sent
0
by: PZ Fosbeck | last post by:
I'm not a Lotus Notes developer but thanks to this group's archives have successfully created a function for sending Lotus Notes emails from Access. The follow code works great except I want to...
1
by: bonokoot | last post by:
Hello, I wrote this program in C# that accesses a SQL Server database that runs a stored procedure and sents the results in an email every 30min. I wrote this as a windows application instead of a...
34
by: antonyliu2002 | last post by:
I've set up the virtual smtp server on my IIS 5.1 like so: 1. Assign IP address to "All Unassigned", and listen to port 25. 2. Access Connection granted to "127.0.0.1". 3. Relay only allow...
16
by: whyyyy | last post by:
The script below works fine if the form is filled out and submitted. But a (blank) e-mail is sent whenever the page loads, even when the form is not submitted. I would like to receive the e-mail...
22
by: Platero | last post by:
Hi, I've a stupid question but... The code is the following: if(($role!='tutor')&&(array_key_exists('tutor_id',$_GET))) { $possible_ids = array(2,6,7,8,9,10); $t_id = $_GET;
1
by: William Connery | last post by:
Hi, I have a small python program with e-mail capabilities that I have pieced together from code snippets found on the internet. The program uses the smtplib module to successfully send an...
9
by: John C. Frickson | last post by:
My company produces reports for our customers in PDF format. I have a php script that verifies login status and access rights, and sends the pdf to the client using readfile(). This has worked...
0
by: Velvet | last post by:
Our staging server has several web sites that send emails. Most of the sites can send email but one of them is gettting the following message when HTML formatted email is sent. We created a test...
6
by: simon2x1 | last post by:
the code below is my mail code its working but message sent to the email is going to the spam mail not the inbox how can make the message go to indox <?php require_once("connect.php"); //...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.