Email attachments from Domino Server to IFS share?

120 pts.
Tags:
IFS
Lotus Domino 8.0.2
Lotus Domino 8.x
Can an agent extract email attachments from a user's mailbox, and move them to an IFS folder on another iSeries (AS400) box without notes cline running? 

We have a generic email account that receives email attachments, but there are no Notes Clients that will be watching it, so this agent would have to react when new mail is received, and extract the attachment and drop it in an IFS share.

Can this be done?



Software/Hardware used:
Domino 8.0.2 on iSeries
ASKED: September 14, 2009  10:31 PM
UPDATED: September 23, 2009  12:06 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hi Hdwest61

Sure you can !
As you said, your agent have to be in the user mail box and will be run by the Domino server, trigered on the “New mail” event.
Create a special folder in the IFS where you will detache your documents.
I have some Lotus Script code to do that if you are interesting…

Discuss This Question: 7  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Hdwest61
    Yes, I'm very interested in looking at the code. I've been chasing down connections to DB2 in the hope I could get to IFS that way, but no luck.
    120 pointsBadges:
    report
  • DanTheDane
    You are touching one of my challenges on my to-do list.. I'll also be very grateful to see actual code. :-) I'll look forward andhope youwill publish the actual code. Thanks in advance.
    2,555 pointsBadges:
    report
  • BruceWayne
    OK You will have this code. Do you know LotusScript ? If i give you my code as is, do you will know how to adapt it (delete what you don't need, change variables, and so on) or you prefer i give you the source a bit rewrited (with comment) ? In the second case, you have to wait a couple of days cause i'm very busy now... And sorry for my poor english !
    4,110 pointsBadges:
    report
  • Hdwest61
    I can get by with the raw code. I knwo VB, and have been working the LotusScrit for a while. I can read the uncommented code and get what i need from it.
    120 pointsBadges:
    report
  • Hdwest61
    Bruce... are you still out there?
    120 pointsBadges:
    report
  • BruceWayne
    Yep, here is the code :
    OPTIONS
    Option public
    Option Declare
    
    INITIALIZE
    Dim s As New NotesSession
    Dim db As NotesDatabase
    Dim doc As NotesDocument
    Dim viewInbox  As NotesView
    	
    Dim tabItem As Variant, tabTemp As Variant
    Dim sPathFichierExport  As String
    Dim  sPlateForme As String
    	
    Set db = s.CurrentDatabase
    Set viewInBox = db.GetView( "($InBox)"  ) 
    	
    sPlateForme = s.Platform
    If splateForme <> "Windows/32" Then
    	sPathFichierExport = "/MY_IFS_SHAREFOLDER_NAME/"
    Else
    	sPathFichierExport = "\MY_ISERIES_NAMEMY_IFS_SHAREFOLDER_NAME"
    End If
    	
    Set doc = viewInBox.GetFirstDocument
    Do While Not doc Is Nothing
    	tabItem = doc.Items
    	Forall ele In tabItem
    		If ele.Type = RICHTEXT  Then
    			tabTemp = ele.EmbeddedObjects
    			If Not Isempty(tabTemp) Then
    				Forall embobj In tabTemp
    					If embobj.Type = EMBED_ATTACHMENT Then
    						Call embObj.ExtractFile ( sPathFichierExport + embobj.Name ) 
    						' If file exists on the disk, then the attachment is removed !
    						If yaFichier( sPathFichierExport + embobj.Name ) = 1Then
    							Call embObj.Remove
    							Call doc.Save( True, False) 
    						End If
    					End If	
    				End Forall
    			End If
    		End If
    	End Forall
    	Set doc = viewInBox.GetNextDocument( doc )
    Loop
    	
    Quit:
    	Exit Sub
    	
    ErrorHandler:
    	Print "Erreur ligne " & Erl & " type " & Err  & " - " & Error 
    	Goto Quit
    
    
    Function YaFichier( strFichier As String ) As Integer If Dir( strFichier , 0 ) = "" Then YaFichier = 0 Else YaFichier = 1 End If End Function
    				
    4,110 pointsBadges:
    report
  • Hdwest61
    Here's a link to what i ended up doing... http://itknowledgeexchange.techtarget.com/itanswers/notes-email-attachment-to-ifs-agent/#comments
    120 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following