| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
|
| Hello. I need to write a lotusscript which will automatically reply with a file attached. The idea is that someone enters a filename in the subject and the file will automatically be attached. I’m guessing this should be 10 to 15 lines of code, but I cannot find any examples. Any pointers to get me started would really be appreciated. Regards Per Erik |
|
#2
|
| This is going to be more than 15 lines of code, but you are right in that the concept is simple. Basically, use the EmbedObject method of the NoteRichTextItem class to attach the document. You can probably get a good starting point by looking at the Designer help for that method. One thing you should consider is making sure the received request is legitimate. For example, you want to make sure you weed out any replies to messages already processed, and weed out any delivery failure notices. If you are dealing with internet mail, the last thing you want to do is keep sending the same attachment to someone whose mail system cannot deliver it for whatever reason (mail file too large, or message too large). That's a good way to get your company blacklisted. Tim Mohrlant Per Erik Midtrød wrote: > Hello. > > I need to write a lotusscript which will automatically reply with a > file attached. > > The idea is that someone enters a filename in the subject and the file > will automatically be attached. > I’m guessing this should be 10 to 15 lines of code, but I cannot find > any examples. > Any pointers to get me started would really be appreciated. > > > Regards > Per Erik |
|
#3
|
| Thanks! I'll look at EmbedObject in the help. Also good of you to mention legitimate requests. I am thinking that if the subject doesn't exactly equal an existing filename then no reply should be sent. Can you see anything wrong with that approach? Per Erik On Aug 25, 11:10*pm, Tim Mohrlant > This is going to be more than 15 lines of code, but you are right in > that the concept is simple. *Basically, use the EmbedObject method of > the NoteRichTextItem class to attach the document. *You can probably get > a good starting point by looking at the Designer help for that method. > > One thing you should consider is making sure the received request is > legitimate. *For example, you want to make sure you weed out any replies > to messages already processed, and weed out any delivery failure > notices. *If you are dealing with internet mail, the last thing you want > to do is keep sending the same attachment to someone whose mail system > cannot deliver it for whatever reason (mail file too large, or message > too large). *That's a good way to get your company blacklisted. > > Tim Mohrlant > > Per Erik Midtrød wrote: > > Hello. > > > I need to write a lotusscript which will automatically reply with a > > file attached. > > > The idea is that someone enters a filename in the subject and the file > > will automatically be attached. > > I’m guessing this should be 10 to 15 lines of code, but I cannot find > > any examples. > > Any pointers to get me started would really be appreciated. > > > Regards > > Per Erik |
|
#4
|
| Excellent idea, thanks! Per Erik On Aug 27, 1:44*am, Tim Mohrlant > As long as it is an exact match, it's probably OK. *Most replies, > returned mail or undelivered mail would have something added to the subject. > > Another technique is to add a token made up of something that would > never likely be in a subject line (such as [X14PR]) and add that to the > memo you send out. *Then your code could look for that token and know to > disregard the message. > > Good luck! > > Tim Mohrlant > > Per Erik Midtrød wrote: > > Thanks! > > > I'll look at EmbedObject in the help. > > > Also good of you to mention legitimate requests. > > I am thinking that if the subject doesn't exactly equal an existing > > filename then no reply should be sent. > > > Can you see anything wrong with that approach? > > > Per Erik > > > On Aug 25, 11:10 pm, Tim Mohrlant > >> This is going to be more than 15 lines of code, but you are right in > >> that the concept is simple. *Basically, use the EmbedObject method of > >> the NoteRichTextItem class to attach the document. *You can probablyget > >> a good starting point by looking at the Designer help for that method. > > >> One thing you should consider is making sure the received request is > >> legitimate. *For example, you want to make sure you weed out any replies > >> to messages already processed, and weed out any delivery failure > >> notices. *If you are dealing with internet mail, the last thing you want > >> to do is keep sending the same attachment to someone whose mail system > >> cannot deliver it for whatever reason (mail file too large, or message > >> too large). *That's a good way to get your company blacklisted. > > >> Tim Mohrlant > > >> Per Erik Midtrød wrote: > >>> Hello. > >>> I need to write a lotusscript which will automatically reply with a > >>> file attached. > >>> The idea is that someone enters a filename in the subject and the file > >>> will automatically be attached. > >>> I’m guessing this should be 10 to 15 lines of code, but I cannot find > >>> any examples. > >>> Any pointers to get me started would really be appreciated. > >>> Regards > >>> Per Erik |
![]() |
| Thread Tools | |
| Display Modes | |