Sending email using Lotus Notes from VB
Sending email using Lotus Notes from VB
Sending email using Lotus Notes from VB
Sending email using Lotus Notes from VB
Sending email using Lotus Notes from VB
Sending email using Lotus Notes from VB Sending email using Lotus Notes from VB Sending email using Lotus Notes from VB Sending email using Lotus Notes from VB Sending email using Lotus Notes from VB Sending email using Lotus Notes from VB Sending email using Lotus Notes from VB Sending email using Lotus Notes from VB
Sending email using Lotus Notes from VB Sending email using Lotus Notes from VB
Sending email using Lotus Notes from VB
Go Back  Xtreme Visual Basic Talk > > > Sending email using Lotus Notes from VB


Reply
 
Thread Tools Display Modes
  #1  
Old 03-18-2003, 10:48 AM
pjshaw pjshaw is offline
Freshman
 
Join Date: May 2002
Location: Manchester, England
Posts: 39
Default Sending email using Lotus Notes from VB


Hi there,

My VB app can currently send email using Outlook (using Outlook.Applications, Outlook.MailItem etc), but now I need to be able to send email via Lotus Notes as well.

I was looking on this forum and came across a few pointers, but I was just wondering if there was a simple little example someone had.

Also, should I be using MAPI or automation classes? Does one have the advantage over the other? I've had a look at MAPI in the MSDN help and it all looks very complicated. Would it be overkill if all I wanted to do is send an email using the Lotus Notes installed on the client machine?

And while I'm here... what is CDO and where does it fit into all this?

Sorry for so many questions.

Thanks in advance,
Paul.
Reply With Quote
  #2  
Old 03-19-2003, 07:40 AM
JordanChrisSending email using Lotus Notes from VB JordanChris is offline
Senior Contributor

* Expert *
 
Join Date: Jan 2003
Location: Newbury, UK
Posts: 1,092
Default

Lotus Notes doesn't understand full MAPI - it only understands Simple MAPI. Therefore the example below should work for Outlook Express or Lotus Notes.
You will have a lot more control using Notes automation - but a lot less help on this (and most other) VB forum(s).
Code:
Put a Microsoft MAPI Session and MAPI Messages control on the form: MAPISession1.SignOn With MAPIMessages1 .SessionID = MAPISession1.SessionID .Compose .RecipAddress = "a.a&a.com" .ResolveName 'For a second addressee add: ' .RecipIndex = 1 ' .RecipAddress = "C.c@c.com" ' .ResolveName ' Might need to add: ' .AddressResolveUI = True .MsgSubject = "My Subject" .MsgNoteText = "My body" .AttachmentIndex = 0 .AttachmentPosition = 0 .AttachmentPathName = "c:\temp\test.txt" .Send End With MAPISession1.SignOff
Reply With Quote
  #3  
Old 03-20-2003, 10:16 AM
pjshaw pjshaw is offline
Freshman
 
Join Date: May 2002
Location: Manchester, England
Posts: 39
Default Thanks

Thanks for that example, much appreciated.

Paul.
Reply With Quote
  #4  
Old 06-26-2003, 08:50 AM
amirfarha amirfarha is offline
Newcomer
 
Join Date: Apr 2003
Posts: 13
Default Mailing through Outlook

Hi pjshaw,

I am trying to create a VB app that sends an email and I am not very familiar with this.. could you please send me the vb app that you made which sends email through outlook.. I am grateful for any help that you can provide.

Thanks

amirfarha

Quote:
Originally Posted by pjshaw
Hi there,

My VB app can currently send email using Outlook (using Outlook.Applications, Outlook.MailItem etc), but now I need to be able to send email via Lotus Notes as well.

I was looking on this forum and came across a few pointers, but I was just wondering if there was a simple little example someone had.

Also, should I be using MAPI or automation classes? Does one have the advantage over the other? I've had a look at MAPI in the MSDN help and it all looks very complicated. Would it be overkill if all I wanted to do is send an email using the Lotus Notes installed on the client machine?

And while I'm here... what is CDO and where does it fit into all this?

Sorry for so many questions.

Thanks in advance,
Paul.

Reply With Quote
  #5  
Old 06-26-2003, 09:26 AM
JordanChrisSending email using Lotus Notes from VB JordanChris is offline
Senior Contributor

* Expert *
 
Join Date: Jan 2003
Location: Newbury, UK
Posts: 1,092
Default

The MAPI code (using MAPImessages and MAPIsession controls) above will work happily through Outlook Express or Outlook 98 or Outlook 2000 or Outlook XP.
Reply With Quote
  #6  
Old 07-14-2003, 05:37 PM
rgvitali's Avatar
rgvitali rgvitali is offline
Regular
 
Join Date: Jul 2003
Location: St. Paul, MN
Posts: 74
Default

I found this code for sending mail through Lotus Domino using VB. It works but I am trying to format text (fonts, colors) and send to multiple recipients. The items in the object browser do not seem to work. Or I am applying them incorrectly.

Dim notesdb As Object
Dim notesdoc As Object
Dim notesrtf As Object
Dim notessession As Object
Dim lnSession As notessession
Set notessession = CreateObject("Notes.Notessession")
Set notesdb = notessession.GETDATABASE("", "")
Call notesdb.OPENMAIL
'Rem make new mail message
Set notesdoc = notesdb.CREATEDOCUMENT
Call notesdoc.REPLACEITEMVALUE("Sendto", strSendTo)
'Call notesdoc.REPLACEITEMVALUE("Copyto", strCopyTo)
'Call notesdoc.REPLACEITEMVALUE("BlindCopyto", strBCC)
Call notesdoc.REPLACEITEMVALUE("Subject", "Referral " + strString)
Set notesrtf = notesdoc.CREATERICHTEXTITEM("body")
Call notesrtf.EMBEDOBJECT(1454, "", "c:\referrals\" + strString1 + "_" + strString + ".xls")
Call notesrtf.ADDNEWLINE(2)
Call notesrtf.APPENDTEXT("My Message")
'Rem attach Error Report doc
'Rem send message
Call notesdoc.Send(False)
Set notessession = Nothing
***********************************
Quote:
Originally Posted by JordanChris
Lotus Notes doesn't understand full MAPI - it only understands Simple MAPI. Therefore the example below should work for Outlook Express or Lotus Notes.
You will have a lot more control using Notes automation - but a lot less help on this (and most other) VB forum(s).
Code:
Put a Microsoft MAPI Session and MAPI Messages control on the form: MAPISession1.SignOn With MAPIMessages1 .SessionID = MAPISession1.SessionID .Compose .RecipAddress = "a.a&a.com" .ResolveName 'For a second addressee add: ' .RecipIndex = 1 ' .RecipAddress = "C.c@c.com" ' .ResolveName ' Might need to add: ' .AddressResolveUI = True .MsgSubject = "My Subject" .MsgNoteText = "My body" .AttachmentIndex = 0 .AttachmentPosition = 0 .AttachmentPathName = "c:\temp\test.txt" .Send End With MAPISession1.SignOff

__________________
It's a Liger; bred for it's skills in magic.
Reply With Quote
  #7  
Old 07-15-2003, 12:48 AM
Lubos Lubos is offline
Newcomer
 
Join Date: Jul 2003
Posts: 2
Default

'Put a Microsoft MAPI Session and MAPI Messages control on the form: ' = HOW? I'm beginner in VB. Thanks.
======================================================

Quote:
Originally Posted by JordanChris
Lotus Notes doesn't understand full MAPI - it only understands Simple MAPI. Therefore the example below should work for Outlook Express or Lotus Notes.
You will have a lot more control using Notes automation - but a lot less help on this (and most other) VB forum(s).
Code:
Put a Microsoft MAPI Session and MAPI Messages control on the form: MAPISession1.SignOn With MAPIMessages1 .SessionID = MAPISession1.SessionID .Compose .RecipAddress = "a.a&a.com" .ResolveName 'For a second addressee add: ' .RecipIndex = 1 ' .RecipAddress = "C.c@c.com" ' .ResolveName ' Might need to add: ' .AddressResolveUI = True .MsgSubject = "My Subject" .MsgNoteText = "My body" .AttachmentIndex = 0 .AttachmentPosition = 0 .AttachmentPathName = "c:\temp\test.txt" .Send End With MAPISession1.SignOff

Reply With Quote
  #8  
Old 07-15-2003, 02:30 AM
JordanChrisSending email using Lotus Notes from VB JordanChris is offline
Senior Contributor

* Expert *
 
Join Date: Jan 2003
Location: Newbury, UK
Posts: 1,092
Default

How much of a beginner are you?? In order to put a control on a form you click on it on the control box (typically on the left) and draw it on the form (typically in the middle).

In order to have the MAPI controls in the control box you need to select the Project / Components menu item, and put a tick in the Microsoft MAPI controls.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Read the textfile attachment from Lotus Notes and output it on VB andrew_tiu Word, PowerPoint, Outlook, and Other Office Products 0 03-17-2003 08:23 PM
Sending HTML Lotus Notes with VB kdewey Word, PowerPoint, Outlook, and Other Office Products 0 03-10-2003 05:09 PM
Sending to Lotus Notes Mike_Col Word, PowerPoint, Outlook, and Other Office Products 2 01-01-2003 05:45 PM
Email thru Lotus Notes pells2 Communications 1 09-27-2002 02:31 PM
QB to VB Conversion - By AIO BillSoo Tutors' Corner 0 08-06-2002 12:37 PM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Sending email using Lotus Notes from VB
Sending email using Lotus Notes from VB
Sending email using Lotus Notes from VB Sending email using Lotus Notes from VB
Sending email using Lotus Notes from VB
Sending email using Lotus Notes from VB
Sending email using Lotus Notes from VB Sending email using Lotus Notes from VB Sending email using Lotus Notes from VB Sending email using Lotus Notes from VB Sending email using Lotus Notes from VB Sending email using Lotus Notes from VB Sending email using Lotus Notes from VB
Sending email using Lotus Notes from VB
Sending email using Lotus Notes from VB
 
Sending email using Lotus Notes from VB
Sending email using Lotus Notes from VB
 
-->