Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Streamlining user types in Qlik Cloud capacity-based subscriptions: Read the Details
cancel
Showing results for 
Search instead for 
Did you mean: 
dollar_sign_expansion
Contributor
Contributor

Qlik SMTP Connector File Attachment

I have successfully setup an SMTP connection to outlook.com using the built-in connectors (and not the stand-alone Qlik Web Connectors

How do I use the attach file feature, and what is the syntax format?

LIB CONNECT TO 'SMTP_(test@outlok.com';

LOAD
status AS [SendEmail.status],
result AS [SendEmail.result];


SELECT
status,
result
FROM SendEmail
WITH PROPERTIES (
to='test@test.com',
subject='Test',
message='test',
html='true',
fromName='',
fromEmail='',
cc='',
bcc='',
);

dollar_sign_expansion_0-1702140400762.png

dollar_sign_expansion_1-1702140535192.png

 

https://help.qlik.com/en-US/connectors/Subsystems/Web_Connectors_help/Content/Connectors_QWC/Data-So...

Labels (1)
1 Solution

Accepted Solutions
steeefan
Luminary
Luminary

Is your screenshot about "Attaching files" from this page? If so, that is probably not the integrated SMTP connector shown in your other screenshot. On that page it says: "This connector must be installed separately."

If I take a look at the config page of the SMTP connector from the Qlik Web Connectors package, I can see a "File Attachment" option. This leads me to believe that it might not be possible with the integrated connector just yet.

View solution in original post

5 Replies
TcnCunha_M
Creator III
Creator III

add this information:
fileAttachment[1-5]=[your local file path]

For example: 

SELECT
status,
result
FROM SendEmail
WITH PROPERTIES (
to='test@test.com',
subject='Test',
message='test',
html='true',
fromName='',
fromEmail='',
cc='',
bcc='',

fileAttachment[1] = 'PATH'
);

As you think, so shall you become.
steeefan
Luminary
Luminary

That can probably only read from an already created data connection, i.e. the path should point to a library: fileAttachment[1] = '[lib://00 Files/abc.xlsx]'

dollar_sign_expansion
Contributor
Contributor
Author

 I have tried this but I get an error @TcnCunha_M @steeefan 

The following error occurred:
Connector reply error: Could not parse SELECT statement.

Syntax error, expected: =

The error occurred here:

fileAttachment[1] = '[lib://Files/test.txt]'

steeefan
Luminary
Luminary

Is your screenshot about "Attaching files" from this page? If so, that is probably not the integrated SMTP connector shown in your other screenshot. On that page it says: "This connector must be installed separately."

If I take a look at the config page of the SMTP connector from the Qlik Web Connectors package, I can see a "File Attachment" option. This leads me to believe that it might not be possible with the integrated connector just yet.

steeefan
Luminary
Luminary

Putting fileAttachment1='lib://00 Files/test.txt' sends an email but also does not attach the specified file. I also tried without "1", with the lib path enclosed in "[]" etc. - no attachment.