Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escape special characters +-&|!(){}[]^"~*?:\ - e.g. \+ \* \!
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
 
Answered
Notification to External email

I am developing an ardent api extension and want to be able to send an email to an external email address in a particular case. Is there a way to do this? I have looked at the Send Notification and it looks like they are sent to q2 users specifically.

from q2_sdk.hq.hq_api.q2_api.SendNotification import ParamsObj
from q2_sdk.hq.hq_api.q2_api import SendNotification

class Notification:
@staticmethod
async def send_notification(logger: LoggerAdapter, email: str, subject: str, body: str):
message_params = ParamsObj(logger, 'email', email, subject, body)

		try:
				res = await SendNotification.execute(message_params, True)

I have this set up and am not getting anything through to my own email

Votes Newest

Answers


Hi Cameron,

Q2 sdk's send notifications hq_api works and sends email .i seen the params are sending in wrong order.can you try adding params in following way.

notification_type = 1 // for email
email = your email
subject = email subject
body = """
<p>Email content <b>[{}]</b></p>
""".format('variablename')
message_params = ParamsObj(self.logger, notification_type, email, subject, body)
await SendNotification.execute(message_params, True)

also inorder to have more custom email template Q2 has SendNotificationWithHtml
https://docs.q2developer.com/api_references/hq_api/q2_api/SendNotificationWithHtml.html?highlight=sendnotificationwithhtml#module-q2_sdk.hq.hq_api.q2_api.SendNotificationWithHtml

Thanks,
Swarup,
https://nuevesolutions.com

Posted 4 years ago
115 Views
1 Answer
4 years ago
4 years ago
Tags