Auto reply with attachment.

This is a discussion on Auto reply with attachment. within the lotus-notes-programmer forums in Other Technologies category; 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...

Go Back   Database Forum > Other Technologies > lotus-notes-programmer

Database Forums

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-24-2008, 06:22 PM
Default Auto reply with attachment.

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
Reply With Quote
  #2  
Old 08-25-2008, 06:10 PM
Default Re: Auto reply with attachment.

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

Reply With Quote
  #3  
Old 08-26-2008, 04:27 PM
Default Re: Auto reply with attachment.

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 wrote:
> 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


Reply With Quote
  #4  
Old 08-27-2008, 05:27 PM
Default Re: Auto reply with attachment.

Excellent idea, thanks!

Per Erik

On Aug 27, 1:44*am, Tim Mohrlant wrote:
> 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 wrote:
> >> 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


Reply With Quote
Reply


Thread Tools
Display Modes



All times are GMT -4. The time now is 07:31 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Integrated by bbpixel2008 :: jvbPlugin R1013.368.1

Search Engine Friendly URLs by vBSEO 3.1.0
vB Ad Management by =RedTyger=
In an effort to better serve ads to our visitors, cookies are used on Mydatabasesupport.com. For more information, check out our Privacy Policy.