473,396 Members | 1,998 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.

Whats are the steps to sending email through vb

I want to know about steps behinds to send an email.
Feb 4 '07 #1
3 1109
iburyak
1,017 Expert 512MB
Try this:
[PHP]

Dim objOutlook
Dim objMailItem
set objOutlook = createobject("Outlook.Application")
Set objMailItem = objOutlook.CreateItem(olMailItem)

With objMailItem
.To = "e-mail address"
.Subject = "put subject here"
.Body = "put text here"
.Send
End With

Set objOutlook = Nothing
Set objMailItem = Nothing [/PHP]
Feb 4 '07 #2
willakawill
1,646 1GB
Slightly different in vb rather than vbscript:
Expand|Select|Wrap|Line Numbers
  1. Private Sub SendEmail()
  2.     Dim olApp As New Outlook.Application
  3.     Dim olItem As Outlook.MailItem
  4.  
  5.     Set olItem = olApp.CreateItem(olMailItem)
  6.  
  7.     With olItem
  8.         .To = "email address here"
  9.         .Subject = "testing mail"
  10.         .Body = "This is a test"
  11.         .Send
  12.     End With
  13.  
  14.     Set olItem = Nothing
  15.     Set olApp = Nothing
  16.  
  17. End Sub
You will need to set Microsoft Outlook as a reference in your project
Feb 4 '07 #3
I tested the above code. its ok.
But in the above code the program used outlook express to sending the mail. and we want to configured the outlook mail box perfectly to send mail.
I want to send mail without the help of outlook, and i want to send mail directly to mail server with out the help of any third party controls thanks
Feb 5 '07 #4

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

Similar topics

0
by: praba kar | last post by:
Dear All, I have doubt regarding mail sending smtplib module. The below code is I used to send a mail. ########################################## import email.Message import email.Utils...
176
by: basecamp | last post by:
just checking the average age of programmers using this group -- thanks
62
by: TheShadow1 | last post by:
safetyTips - this array is in here.js ...
3
by: Ant | last post by:
Hi, I'm using the MailMessage & smtpMail classes in System.Web.Mail to send mail, however it's not sending any emails. I'm using it on a Windows 2003 server. The simplest way to use this is...
1
by: Eric Sheu | last post by:
Greetings, I have been searching the web like mad for a solution to my SMTP problem. I am using Windows Server 2003 and ASP.NET 2.0 w/ C# to send out e-mails from a web site I have created to...
1
by: Abubakar | last post by:
Hi, In my application, Some of my thread gets stuck somewhere. The vs2k5 debugging "Thread" window shows that stuck thread and I can I dentify it. In its Name column the following text is...
9
by: JoeP | last post by:
Hi All, How can I find the reason for such an error: Failure sending mail. Some Code... oMailMessage.IsBodyHtml = False oMailMessage.Body = cEmailBody Dim oSMTP As New SmtpClient...
7
by: bleachie | last post by:
Hey, I just need some help, my form seems to not send me all of the 'guestNames' and 'guestEmails' forms. i use this function to add more guestnames and guestemail fields based on the number of...
10
by: Markgoldin | last post by:
I am sending an XML data from not dontnet process to a .Net via socket listener. Here is a data sample: <VFPData> <serverdata> <coderun>updateFloor</coderun> <area>MD2</area>...
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: 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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...

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.