i am trying to generate (not send) an email with an attachment
currently, im using _inetmail but it doesnt provide an attachment option. i also saw Jos's awesome udf for sending an email using the smtp server settings.
i just want to create an email and attach a file - let the user type in recipient and click send
any ideas??
(using lotus notes)
many thanks
Page 1 of 1
generating an email with an attachment not sending just generating
#2
Posted 03 November 2009 - 04:13 PM
I use the following code for Outlook:
I don't know if there is something similar for Notes.
Edit:
Searching the forum I found this.The mentioned IBM redbook "COM Togehter - with Domino" can be found here.
This post even has a script example.
[ autoIt ] ( Popup )
$oOApp = ObjCreate("Outlook.Application") $oOMail = $oOApp.CreateItem($olMailItem) With $oOMail .To = ($MailAn) .Subject = "blah blah" .BodyFormat = 2 ; $olFormatHTML .Importance = 2 ; $olImportanceHigh .HTMLBody = '<span style="font-family:Arial;font-size:10pt">' & _ 'The files in Directory' & _ '<P><a href="file:///' & $Target & '">' & $Target & '</a>' & _ '<P>have changedt.' .Display ; .Send EndWith
I don't know if there is something similar for Notes.
Edit:
Searching the forum I found this.The mentioned IBM redbook "COM Togehter - with Domino" can be found here.
This post even has a script example.
This post has been edited by water: 03 November 2009 - 04:24 PM
#3
Posted 03 November 2009 - 04:22 PM
thanks for the response!
theres ObjCreate("Notes.NotesSession")
tried this but didnt work:
theres ObjCreate("Notes.NotesSession")
tried this but didnt work:
[ autoIt ] ( Popup )
$oOApp = ObjCreate("Notes.Session") $oOMail = $oOApp.CreateItem($olMailItem) With $oOMail .To = ($MailAn) .Subject = "blah blah" .BodyFormat = 2 ; $olFormatHTML .Importance = 2 ; $olImportanceHigh .HTMLBody = '<span style="font-family:Arial;font-size:10pt">' & _ 'The files in Directory' & _ '<P><a href="file:///' & $Target & '">' & $Target & '</a>' & _ '<P>have changedt.' .Display ; .Send EndWith
This post has been edited by gcue: 03 November 2009 - 04:22 PM
#4
Posted 03 November 2009 - 05:44 PM
this worked =) (found a vbs script and converted it)
sends the email though =/ and mailfile has to be opened..
sends the email though =/ and mailfile has to be opened..
$oSession = ObjCreate("Notes.NotesSession") $oCurrentMailDb = $oSession.CurrentDatabase ; Create a document in the back end $oMailDoc = $oCurrentMailDb.CREATEDOCUMENT $ortItem = $oMailDoc.CREATERICHTEXTITEM("Body") with $ortItem .AppendText("Here are the logs you requested for ") ;~ .AddNewLine(2) ;~ .AppendText("Please let me know if you need anything else.") EndWith $cstrAttachment = "c:\aclient.cfg" $blAttachment = 1 If $blAttachment Then $ortAttacment = $oMailDoc.CREATERICHTEXTITEM("Attachment") ; Function EMBEDOBJECT(ByVal TYPE As Short, ByVal CLASS As String, ByVal SOURCE As String, Optional ByVal OBJECTNAME As Object = Nothing) As Object ; Member of lotus.NOTESRICHTEXTITEM $oEmbedObject = $ortAttacment.EMBEDOBJECT(1454, "", $cstrAttachment, "Attachment") EndIf With $oMailDoc .SendTo = "test@test.com" .Subject = "Logs for" .BodyFormat = 2 ; $olFormatHTML ;~ .Importance = 2 ; $olImportanceHigh ;~ .HTMLBody = '<span style="font-family:Arial;font-size:10pt">' & _ ;~ 'The files in Directory' & _ ;~ '<P><a href="file:///' & $Target & '">' & $Target & '</a>' & _ ;~ '<P>have changedt.' .Display .Send(0) EndWith
This post has been edited by gcue: 03 November 2009 - 05:44 PM
Page 1 of 1

Sign In
Register
Help

MultiQuote