?
Solved

Sending Email from Visual Basic.

Posted on 2003-03-18
7
Medium Priority
?
195 Views
Last Modified: 2013-12-04
Visual Basic is very powerful! All I want to know is some expert advice on email sending. When sending email you can use the mailto command but there are some limitation in the body. You can only send a certain amount of caracters. Using Outlook's Com Object is also limited in the sence that you can only use Outlook. If the user only has Outlook Express or even navigator, then you sit with your finger in your ear! What is the best possible way to do this? How can we as developers send email so that the default installed email client will be used? I have a feeling that it is going to be the mailto command. Why this is limited for me is that I need to be able to email document. Text that users insert into a database must be emailed at will. So obviously the documents will contain more that 500 caracters. Please help!!!

Abrian
0
Comment
Question by:Abrian
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
7 Comments
 
LVL 4

Accepted Solution

by:
iozturk earned 1200 total points
ID: 8159561
Try using the code someting like. First add CDONTS lib. from references.

Dim objmail As cdonts.NewMail
   Dim email As String
   Dim file_name As String
   Dim fso As Scripting.FileSystemObject
   Dim objability As Helpdesk.Ability
   Dim uploadpath
   
   
   On Error GoTo ErrorX
     
   uploadpath = fUploadPath
   Set objmail = New cdonts.NewMail
   isim = objability.fFindAdi(kulkodu) & " " & objability.fFindSoyadi(kulkodu)
   objmail.From = objability.fFindEmail(kulkodu)
   objmail.To = "a@b.com"
   objmail.Subject = "subject"
   objmail.Body = "message"
   
   
   
       objmail.Send
    End If
   
    Set objmail = Nothing
    Set objability = Nothing
0
 
LVL 4

Expert Comment

by:iozturk
ID: 8159573
There are some typo


Dim objmail As cdonts.NewMail
Dim email As String
Dim uploadpath
 

 
  Set objmail = New cdonts.NewMail

  objmail.From = objability.fFindEmail(kulkodu)
  objmail.To = "a@b.com"
  objmail.Subject = "subject"
  objmail.Body = "message"
 
 
   
   objmail.Send

0
 
LVL 4

Expert Comment

by:iozturk
ID: 8159581

Again typo

pls change

 objmail.From = objability.fFindEmail(kulkodu)
to
 objmail.From = "youremail"
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 70

Assisted Solution

by:Éric Moreau
Éric Moreau earned 800 total points
ID: 8161008
0
 

Expert Comment

by:CleanupPing
ID: 9447040
Abrian:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 9447086
split points between emoreau and iozturk
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Progress
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question