Email Attachments - Solved, Kinda

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Email Attachments - Solved, Kinda

Marc Pinnell-3
Sorry, wrong part of the code that caused the problem (guess I ought  
to look a little closer before running off). This is where it came from:

                                Email_Send: -Host='mail.xx.com',
                                                                -To='[hidden email]',
                                                                -From='[hidden email]',
                                                                -replyto=$ReturnAddress,
                                                                -Subject=$vSubject,
                                                                -Body=(encode_breakonly: $vBody, -encodesmart),
                                                                -Attachments=$FileToAttach,
                                                                -ExtraMIMEHeaders=$MIME_Headers;

There is no error trap on the attachments statement. I guess when  
there is no file with an Email_Send Lasso grabs the index file??

TIA,
Marc

------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Email Attachments - Solved, Kinda

Bil Corry-3
Marc Pinnell wrote:

> Sorry, wrong part of the code that caused the problem (guess I ought to
> look a little closer before running off). This is where it came from:
>
>                 Email_Send:     -Host='mail.xx.com',
>                                 -To='[hidden email]',
>                                 -From='[hidden email]',
>                                 -replyto=$ReturnAddress,
>                                 -Subject=$vSubject,
>                                 -Body=(encode_breakonly: $vBody,
> -encodesmart),
>                                 -Attachments=$FileToAttach,
>                                 -ExtraMIMEHeaders=$MIME_Headers;
>
> There is no error trap on the attachments statement. I guess when there
> is no file with an Email_Send Lasso grabs the index file??

email_send does an [include_raw] for the name of the file to attached.  If you pass it a blank name, in effect you'd be doing [include_raw:''], which should return an error.

In any event, you should always validate user input.  There isn't anything stopping your users from having your system mail them your site code.


- Bil


------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage