473,520 Members | 2,786 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Sending Emails

5 New Member
HI....


i have visual basic 6 and i want this program to send me emails.. i don't have any idea how to do this...
can someone explain for me step by step how to do this....



thank you
Feb 10 '08 #1
8 1109
nawaray
5 New Member
no reply:(

please i need someones help
Feb 11 '08 #2
debasisdas
8,127 Recognized Expert Expert
Try to use Microsoft MAPI controls..
Feb 11 '08 #3
nawaray
5 New Member
how can i use that? can you explain for me please
Feb 11 '08 #4
debasisdas
8,127 Recognized Expert Expert
add mapisession and mapimessage control to the form.

try to use the sample

Expand|Select|Wrap|Line Numbers
  1. Private Sub Command1_Click()
  2. MAPISession1.SignOn
  3. MAPIMessages1.SessionID = MAPISession1.SessionID
  4. 'Compose new message
  5. MAPIMessages1.Compose
  6. 'Address message
  7. MAPIMessages1.RecipDisplayName = "debasis"
  8. MAPIMessages1.RecipAddress = "debasis.8000@gmail.com"
  9. ' Resolve recipient name
  10. MAPIMessages1.AddressResolveUI = True
  11. MAPIMessages1.ResolveName
  12. 'Create the message
  13. MAPIMessages1.MsgSubject = "Hi"
  14. MAPIMessages1.MsgNoteText = "Test mail"
  15. 'Add an attachment
  16. MAPIMessages1.AttachmentPathName = "path of the file to attach"
  17. 'Send the message
  18. MAPIMessages1.Send False
  19. MAPISession1.SignOff
  20. End Sub
  21.  
  22.  
  23.  
Feb 11 '08 #5
jimmylee
17 New Member
Expand|Select|Wrap|Line Numbers
  1. Private Sub Command1_Click()
  2. Dim email
  3. Set email = CreateObject("cdo.message")
  4.  
  5. With email
  6. .to = "someone@domain.com"
  7. .cc = "someone@domain.com"
  8. .subject = "something"
  9. .From = "someone@domain.com"
  10. .textbody = "Some thing"
  11. .AddAttachment ("C:\aspsmartupload.dll")
  12. .send
  13. End With
  14. End Sub
Feb 11 '08 #6
nawaray
5 New Member
where shall i insert this code?
in the form? or a button?
Feb 12 '08 #7
debasisdas
8,127 Recognized Expert Expert
The code itself is self explanatory.
Feb 12 '08 #8
jamesd0142
469 Contributor
where shall i insert this code?
in the form? or a button?
insert the code in a button
Feb 12 '08 #9

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

Similar topics

1
2875
by: dan glenn | last post by:
I'm creating HTML emails from a PHP site and sending them out to an email list (just about 40 people so far are on this list). I've tested and confirmed that these emails work in yahoo.com's webmail. And I know they work on *my* Outlook Express. But I have one person (I know of) who gets the emails as plain text, so she sees the HTML code for...
10
4944
by: Stuart Mueller | last post by:
I have an exchange server, that I sometimes use to perform mail shots to clients on our database, these can be upwards of 1000 at a time. As we don't want different clients to see who we are working with we put these mailshots in the bcc field of the mails. This can sometimes cause a problem as we are getting alot of mails bounced back. I...
1
5106
by: Ian Taylor | last post by:
Hi all... Is it possible to send RTF-formatted emails using the .NET SmtpMail implementation? I can only find provision in the BodyFormat property of the message to send plain text or HTML emails. I also have a similar problem in sending HTML/RTF emails via MAPI and would appreciate any help anyone could give me in these areas.
3
2213
by: VB Programmer | last post by:
My company has it's own webserver, which is going to host our ASP.NET web application. We want the website to be able to send out emails. 1. What do I need on the server so that it has the abillity to send out emails? It is a Windows 2000 Professional SP3 server. 2. Any examples (code, etc...) on how to send out emails via an ASP.NET...
2
9207
by: Mr. x | last post by:
Hello, I am sending emails with Hebrew contents. When receiving emails - I cannot see the Hebrew characters (it is not outlook express configuration, because when receiving emails from friends - I see hebrew, it is just sending by myself using *.aspx scripts). In web.config I have the following : <configuration> <system.web>
3
3597
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 smtpMail.Send("from@here.com", to@there.com, "Message subject", "Message Body") I'm sending it to my own email address on a different server using...
5
23769
by: Kun | last post by:
i have the following code: ---------------------------------- import smtplib from email.MIMEText import MIMEText fp = open('confirmation.txt', 'rb') msg = MIMEText(fp.read()) From = 'xxxx@xxxx.xxxx.edu'
5
2421
by: Jai | last post by:
Hi, I am in a problem of sending mass emails(newsletter) to my website members. Actually my problem is this: I want to send newsletter to my website members. But I had given a facility for each member to choose different category of products or all products newsletter.
1
2929
by: robbiesmith79 | last post by:
Just so this is out there on the web, I battled the past 24 hours about this. Background info... I developed a ecommerce website in PHP 4 on a shared linux hosting plan from GoDaddy and had the html formatted emails sending as text/html and were going fine with limited header information. Then we moved the site over to a Dedicated Linux...
2
3727
by: lstanikmas | last post by:
Hi, I'm validating a form with this ASP but receiving some blank email responses; does anyone see anything wrong with it?: function isFormVarExcluded(thisForm, strToCheck) { var strExcludeVars = thisForm.elements.value; var arrExcludeVars = strExcludeVars.split(","); for (var j=0; j<arrExcludeVars.length; j++) { if (arrExcludeVars ==...
0
7304
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
7439
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
7602
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...
0
7560
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...
0
4788
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3282
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
1646
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
837
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
506
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.