I’m struggling to get SMTPClient working because get_body
and get_mime_msg
are not defined. Same behaviour in REPL and ^F5 .
Apart from adding the package and the using SMTPClient
line do I need to do anything else?
opt = SendOptions(
isSSL = true,
username = "me@mydomain.com",
passwd = "mypassword"
)
url = "smtp.office365.com:587"
message = string("Text for body of email")
subject = "the subject"
to = ["<user1@adomain.com>"]
cc = ["<user2@adomain.com>"]
bcc = ["<user3@adomain.com>"]
from = "me@mydomain.com"
replyto = "me@mydomain.com"
attachments = [filename]
mime_msg = get_mime_msg(message)
body = get_body(to, from, subject, mime_msg; attachments)
rcpt = vcat(to, cc, bcc)
resp = send(url, rcpt, from, body, opt)
Windows10, VSCode 1.61.2, Julia 1.6.2
Thanks
Steve