In my app I’m sending mails to me and a copy to the user when the app has a problem. This works for most customers. But some have an error 22 “Invalid Argument”. The Internet says only strange things about this error. I found an old post from Charles Yeomans in 2009 that this means the following:
But I’m getting this on first send.
[code] socket1.address = “smtp.sendgrid.net”
socket1.port = 25
socket1.username = username
socket1.password = password
dim theMessage as new emailMessage
theMessage.fromAddress = TFName.Text + " <"+ TFEmailAddress.Text.Trim + “>”
theMessage = “Error Report”
'snip
theMessage.AddRecipient recipient
socket1.messages.append theMessage
socket1.sendMail
[/code]
Latest version of Xojo, Cocoa, Mac OS 10.9.