Post

Replies

Boosts

Views

Activity

Send mails in background via SMTP (macOS)
Hi! I wrote a backup program in Swift which is used for several servers. It does send an email each day about the backup status. Currently I use /usr/bin/mail because it works well with via postfix configuration. Now I need to add an attachment (an image about the access statistics) and this is not possible using the mail command. I looked at the docs and I found NSSharingService(named: NSSharingService.Name.composeEmail) but it does just create a mail which is opened in Mail.app. Is there really no OS provided way to send an SMTP mail without any user interaction? I don't want to implement a 3rd party SMTP-Library. TIA, GreatOm
3
0
2.6k
Oct ’21
Send mails in background via SMTP (macOS)
Hi! I wrote a backup program in Swift which is used for several servers. It does send an email each day about the backup status. Currently I use /usr/bin/mail because it works well with via postfix configuration. Now I need to add an attachment (an image about the access statistics) and this is not possible using the mail command. I looked at the docs and I found NSSharingService(named: NSSharingService.Name.composeEmail) but it does just create a mail which is opened in Mail.app. Is there really no OS provided way to send an SMTP mail without any user interaction? I don't want to implement a 3rd party SMTP-Library. TIA, GreatOm
Replies
3
Boosts
0
Views
2.6k
Activity
Oct ’21