# Sending email from Mac desktop app

**URL:** <https://ifnotnil.com/t/sending-email-from-mac-desktop-app/4411>\
**Category:** Xojo\
**Created:** [24 July 2025 20:12 UTC](https://ifnotnil.com/t/sending-email-from-mac-desktop-app/4411 "2025-07-24T20:12:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![TomBaumgartner](https://ifnotnil.com/user_avatar/ifnotnil.com/tombaumgartner/32/427_2.png) [@TomBaumgartner](https://ifnotnil.com/u/TomBaumgartner)\
**Post date:** [24 July 2025 20:12 UTC](https://ifnotnil.com/t/sending-email-from-mac-desktop-app/4411/1 "2025-07-24T20:12:28Z")

</div>

macOS Sonoma 14.7.5  
Xojo 2025r1.1

I want to send emails with a PDF attached from my AOL account (or maybe my Gmail account at my curling club).  
I have tried using both Xojo code only and Monkeybread plugin.  
I have another program which sends similar emails through my tennis club’s web server account so I know it can be done.  
Below is the code.  
Socket1 is a SMTPSecureSocket with the Secure switch true. Out of desperation I tried all the SSL Connection Types and all the SMTP Connection Modes.  
Anybody see the problem?

> dim mail as EmailMessage  
> dim t as string

mail=new EmailMessage  
// set up the socket  
Socket1.Address = “[smtp.aol.com](http://smtp.aol.com)”  
Socket1.Port = 465  
Socket1.UserName = app.pDictEmail.Value(“YourEmail”)  
Socket1.Password = app.pDictEmail.Value(“YourPassword”)

mail.FromAddress=app.pDictEmail.Value(“YourEmail”)  
mail.AddRecipient(emailAdd)  
for each em as string in gSendCopies  
mail.AddCCRecipient(em)  
next

mail.Subject=app.pDictIdentity.LookUp(“ClubName”,“Curling Club”)+" Ice Time Schedule Update"  
t=“league ice time schedule”

mail.BodyPlainText=“This email contains the “+t+”. Open the attached PDF to see the details.”

dim attach as new EmailAttachment  
attach.MIMEType=“application/pdf”  
attach.LoadFromFile(file)

attach.name=“Ice Time Schedule Update.pdf”  
mail.Attachments.Add(attach)

Socket1.Messages.Add(mail)  
Socket1.SendMail

---

<div class="post-metadata">

**Author:** ![WhileNotNil](https://ifnotnil.com/letter_avatar_proxy/v4/letter/w/c57346/32.png) [@WhileNotNil](https://ifnotnil.com/u/WhileNotNil)\
**Post date:** [24 July 2025 21:30 UTC](https://ifnotnil.com/t/sending-email-from-mac-desktop-app/4411/2 "2025-07-24T21:30:28Z")

</div>

Do you have an app specific password for this?  
Otherwise you could implement oauth.

---

<div class="post-metadata">

**Author:** ![TomBaumgartner](https://ifnotnil.com/user_avatar/ifnotnil.com/tombaumgartner/32/427_2.png) [@TomBaumgartner](https://ifnotnil.com/u/TomBaumgartner)\
**Post date:** [27 July 2025 16:38 UTC](https://ifnotnil.com/t/sending-email-from-mac-desktop-app/4411/3 "2025-07-27T16:38:12Z")

</div>

Thanks for reply. But I don’t know why I need an app specific password.  
I am using my AOL username and password. Why doesn’t that work?

---

<div class="post-metadata">

**Author:** ![HalGumbert](https://ifnotnil.com/user_avatar/ifnotnil.com/halgumbert/32/2198_2.png) [@HalGumbert](https://ifnotnil.com/u/HalGumbert)\
**Post date:** [27 July 2025 16:46 UTC](https://ifnotnil.com/t/sending-email-from-mac-desktop-app/4411/4 "2025-07-27T16:46:46Z")

</div>

> [@TomBaumgartner](#):
>
> Why doesn’t that work?

App specific passwords are for older apps that cannot do all the fancy auth stuff. So they now offer the app specific password for older, simpler, apps.

---

<div class="post-metadata">

**Author:** ![THEYCALLMEBILL](https://ifnotnil.com/letter_avatar_proxy/v4/letter/t/6bbea6/32.png) [@THEYCALLMEBILL](https://ifnotnil.com/u/THEYCALLMEBILL)\
**Post date:** [29 July 2025 04:37 UTC](https://ifnotnil.com/t/sending-email-from-mac-desktop-app/4411/5 "2025-07-29T04:37:29Z")

</div>

I use Google for these occasions. No telling how long they will support it.

 ![image](https://ifnotnil.com/uploads/default/original/2X/2/27ef01e526c3a1c564cf45aba5a4141d335a04c0.png)
