You have a few options.

1. As above, one option is to use a complete path, this may error
if there is a proxy server between your app and the website.

2. Another option is to download the file to your local machine,
then just check the header to see has it changed, & download it again
if it has...
this way you always have a local file to attach to your email
it may fail with a proxy error as above

3. Yet another option (depending on where your app is running in
relation to the website)
would be to use UNC paths:

\\yourwebserver\your\file\path

This will only be applicable if your website & application are running
in the same network.
you're app will also need permissions to access the network.

 Hope this helps

Steve

On Dec 18, 6:34 pm, Ana <[email protected]> wrote:
> Hi,
>
> I need to send an email with attachment, but the attachment is in the
> company website. What I'm doing is:
>
>    thumbPath = "Folder/Image.jpg"
>    thumbPath = "www.companywebsite.com/" & thumbPath
>    Dim attachment As New MailAttachment(thumbPath)
>
> However, the following error message is fired: Invalid mail attachment
> 'www.companywebsite.com/Folder/Image.jpg'
>
> I typed the thumbPath in the browser and the Image is found in the
> website. How to attach this image in my email?
>
> Thanks in advance,
>
> Ana

Reply via email to