473,563 Members | 2,747 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to send email to another person with using Microsoft Visual Basic 6.0.?

How to send email to another person with using Microsoft Visual Basic 6.0.?
Jun 5 '07 #1
3 2905
laks082002
1 New Member
How to send email to another person with using Microsoft Visual Basic 6.0.?

Dear Friend,

Try this code, it perfectly worked for me (but the important point it will automatically send mail through outlook so please make sure that your outlook is configured before using this script)

Dim olApp As Outlook.Applica tion
Dim olNs As Outlook.NameSpa ce
Dim olItem As Outlook.Contact Item
Dim olMail As Outlook.MailIte m
Set olApp = CreateObject("O utlook.Applicat ion")
Set olItem = olApp.CreateIte m(olContactItem )
Set olMail = olApp.CreateIte m(olMailItem)
With olItem
.Email1Address = Address
End With
olMail.To = olItem.Email1Ad dress
olMail.subject = subject
olMail.Body = Content
olMail.Send
Jun 10 '07 #2
neo008
85 New Member
What if I dont want to configure outlook? Is there some method to do by scripts like a command button will mail a text box details?

NE☼
Jun 12 '07 #3
ansumansahu
149 New Member
What if I dont want to configure outlook? Is there some method to do by scripts like a command button will mail a text box details?

NE☼
Hi ,

You can use Microsoft MAPI Controls 6.0.

good luck
-ansuman sahu
Jun 12 '07 #4

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

Similar topics

13
7522
by: MLH | last post by:
I want to send 2 reports using SendObject. Something like this would do nicely... DoCmd SendObject A_REPORT, "rpt1";"rpt2", A_FORMATRTF, MyRecip, , , MySubject, MyBodyText, 0 ....except for the fact that this syntax won't compile. Suggestions?
2
1205
by: Alex | last post by:
Hi, My booking system sends a HTML formated email as a recipt to the client on completion of their booking. All is working well however it has been pointed out to me that not all people's email clients will display the reciept as HTML, if for instance the person has chosen to view email's as plain text only, then the email will render as a...
15
8578
by: cj | last post by:
How can I get a button in VB to send the contents of a text box via email in a manner similar to the "Send To\Mail Recipient" functionality that you can select via right clicking a file in Windows Explorer? I want the user to click a button and it lunch the users default email client and put the contents of a multi line text box in the body...
4
2355
by: Max | last post by:
hi I am using System.Web.Mail.MailMessage with System.Web.Mail.SmtpMail to send mail. now the my question is, Is it compulsory to add fields smtpauthenticate, sendusername and sendpassword fields to MailMessage Object????. mm.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1")
0
7664
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7885
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7638
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7948
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5484
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1198
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
923
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.