Skip to content

Apprise with a simple attachment shown in example dont work #1189

Discussion options

You must be logged in to vote

Thanks again @caronc for the wonderful Library!

I figured out using the notify decorator.

Here is a simple implementation if someone is looking for similar approach.

import os
import sendgrid
from sendgrid.helpers.mail import Mail, Attachment, FileContent, FileName, FileType, Disposition
from apprise.decorators import notify
from base64 import b64encode

@notify(on="sendgrid")
def custom_notify(body, title='', notify_type=None, attach=None, **kwargs):
    """
    Custom notification function that sends an email via SendGrid.
    
    :param body: The body of the email.
    :param title: The subject of the email.
    :param notify_type: The type of notification (not used in this example).
…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@jayasimha-raghavan-unskript
Comment options

@jayasimha-raghavan-unskript
Comment options

Answer selected by jayasimha-raghavan-unskript
@caronc
Comment options

@jayasimha-raghavan-unskript
Comment options

@caronc
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants