Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All,
I am using below code to send mail from lotus notes (my own mailbox). Please let me know how I can send the same mail using client mailbox. Dim Maildb As Object 'The mail database Dim UserName As String 'The current users notes name Dim MailDbName As String 'THe current users notes mail database name Dim MailDoc As Object 'The mail document itself Dim AttachME As Object 'The attachment richtextfile object Dim Session As Object 'The notes session Dim EmbedObj As Object 'The embedded object (Attachment) Set Session = CreateObject("Notes.NotesSession") UserName = Session.UserName MailDbName = Left$(UserName, 1) & Right$(UserName, (Len(UserName) - InStr(1, UserName, " "))) & ".nsf" Set Maildb = Session.GETDATABASE("", MailDbName) If Maildb.IsOpen = True Then 'Already open for mail Else Maildb.OPENMAIL End If 'Set up the new mail document Set MailDoc = Maildb.CREATEDOCUMENT MailDoc.Form = "Memo" MailDoc.sendto = tto MailDoc.CopyTo = cc MailDoc.BlindCopyTo = bcc MailDoc.from = from MailDoc.subject = subject MailDoc.body = BodyText Set AttachME = MailDoc.CREATERICHTEXTITEM("Attachment") Set EmbedObj = AttachME.EMBEDOBJECT(1454, "", attachment, "Attachment") MailDoc.CREATERICHTEXTITEM ("Attachment") 'Send the document MailDoc.PostedDate = Now() 'Gets the mail to appear in the sent items folder MailDoc.Send 0, Recipient 'Clean Up Set Maildb = Nothing Set MailDoc = Nothing Set AttachME = Nothing Set Session = Nothing Set EmbedObj = Nothing Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Send Mail using Lotus Notes | Excel Programming | |||
How to send a mail from excel macro using Lotus notes... | Excel Programming | |||
Send Lotus Notes Mail with excel | Excel Programming | |||
Send Mail with Lotus Notes | Excel Discussion (Misc queries) | |||
Automatically send e-mail with Lotus Notes | Excel Programming |