Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4518 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

What I have been doing is, first I set a loop so that it grabs 1 field, the same field, which is the raw data URL from the container, and sets it up in the variable. This is the calculation:

Set Variable [$List ; List ( $List ; "EmailAttachFile( "&"\""&Documents::_c_RawData URL&"\""&" ) and" )]

It appears to get the data correctly, because I have it set a random field just to make sure. So I setRandomField $List, and it displays what I have gathered from the records:

EmailAttachFile( "http://url1" ) and

EmailAttachFile( "http://url2" ) and

EmailAttachFile( "http://url3" ) and

When I run the following script, it nothing happens however (I took out the email information for privacy):

EmailSetBody( "This is the body of the email" ; "plain" ) and

$List

EmailSend and

EmailDisconnect

BUT, when I run the following script, it works perfectly:

EmailSetBody( "This is the body of the email" ; "plain" ) and

EmailAttachFile( "http://url1" ) and

EmailAttachFile( "http://url2" ) and

EmailAttachFile( "http://url3" ) and

EmailSend and

EmailDisconnect

Any thoughts on why this is happening?

Posted

If you are assigning the variable $List to the result of the EmailAttachFile function calls the value in that variable will be 1 (provided there are no errors). If you are doing this before calling EmailConnect or EmailCreate it will not have any message to attach the files to and should return an error instead. In either case, the result of calling the EmailAttachFile functions is not the same thing as calling them. It appears this is why you are experiencing the difference in behavior.

  • Newbies
Posted

Here is my full code, obviously with the real email information hidden for privacy purposes. This is the whole step, and is a calculation for $result variable:

EmailConnectSMTP(

"smtp.gmail.com:465" ;

"[email protected]" ;

"hidden" ;

"ssl=1") and

EmailCreate ( "[email protected]" ; "[email protected]" ; "Hidden" ) and

EmailSetBody( "This is the body of the email" ; "plain" ) and

$List

EmailSend and

EmailDisconnect

  • Newbies
Posted

In either case, the result of calling the EmailAttachFile functions is not the same thing as calling them. It appears this is why you are experiencing the difference in behavior.

I think I understand what you mean by this, meaning that it's bringing it in as text rather than the function. Do you know how I can solve this?

Posted

You can't really "solve" this as the function will be executed wherever it is being called. In your case, that looks to be in after the EmailSetBody call. You should still be able to create a script that has logic to accomplish what you need.

This topic is 4518 days old. Please don't post here. Open a new topic instead.

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...

Important Information

By using this site, you agree to our Terms of Use.