Jump to content

Recommended Posts

Posted

Hello AutoIt community!

I have a script that sends and email with attachments when I run the script. This script works perfectly. When I call that script from another script, it sends the email but does not include the attachment. Any idea why this would be happening? Thanks in advance!

Posted

How you are adding attachment ?
Maybe like this

@scriptdir & ...

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted
  On 11/18/2015 at 10:20 AM, mLipok said:

How you are adding attachment ?
Maybe like this

@scriptdir & ...

 

Thank you for the suggestion. I was adding the attachment with the @ScriptDir method. When I run the au3 with the email functionality by itself, it works perfectly. When I call the au3 with the email functionality from a different au3, the attachments wont send.

Posted

So as I understand you found where the issue was, and fix your own script ?

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted
  On 11/18/2015 at 11:18 AM, mLipok said:

So as I understand you found where the issue was, and fix your own script ?

No I haven't. I can't figure out why the attachment isn't being added.

I have one script with the email function (lets call it sendEmail.au3) and another one that runs my program (lets call this one main.au3).

I have a file I would like to attach (lets call this file attachment.brdf)

I have main.au3 in a main directory. There is a subdirecotry called subDir which is where sendEmail.au3 is. Inside of subDir there is another directory called subDir2 which contains attachment.brdf. When I run sendEmail.au3, it attaches the attachment and sends the email just fine, but when I run main.au3 and call sendEmail.au3 from the main script, the email is sent without the attachment. It's really confusing.

Posted

How you call sendEmail.au3 ?

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...