Search Issue Tracker
Fixed in 2018.2.X
Fixed in 2017.2.X, 2017.3.X, 2018.1.X
Won't Fix in 2017.1.X
Votes
0
Found in
2017.1.0p5
Issue ID
947208
Regression
No
[IL2CPP] [.NET 4.6] Mail doesn't send when calling SmtpClient.Send
Reproduction steps:
1. Allow less secure apps to access your email account.
- Google guide: https://support.google.com/accounts/answer/6010255?hl=en
- Unity account may not be viable for security reasons (Tested with personal email).
2. Open the attached project.
3. Open EmailTestingScript.cs
4. Fill 'TODO' sections.
- Tested with smtp.gmail.com host and 587 port.
5. Play the Main scene.
- Success message will show.
6. Make sure Scripting Backend is set to IL2CPP and Scripting Runtime Version to .NET 4.6 in iOS Build Settings.
7. Build and run in iOS device.
-An email will not send with the following message:
...
System.Net.Mail.SmtpException: Message could not be sent. ---> System.IO.IOException: Connection closed
at System.Net.Mail.SmtpClient.Read () [0x00000] in <00000000000000000000000000000000>:0
at System.Net.Mail.SmtpClient.SendCommand (System.String command) [0x00000] in <00000000000000000000000000000000>:0
at System.Net.Mail.SmtpClient.SendCore (System.Net.Mail.MailMessage message) [0x00000] in <00000000000000000000000000000000>:0
at System.Net.Mail.SmtpClient.SendInternal (System.Net.Mail.MailMessage message) [0x00000] in <00000000000000000000000000000000>:0
at System.Net.Mail.SmtpClient.Send (System.Net.Mail.MailMessage message) [0x00000] in <00000000000000000000000000000000>:0
at EmailTestingScript.Start () [0x00000] in <00000000000000000000000000000000>:0
--- End of inner exception stack trace ---
at System.Net.Mail.SmtpClient.Send (System.Net.Mail.MailMessage message) [0x00000] in <00000000000000000000000000000000>:0
at EmailTestingScript.Start () [0x00000] in <00000000000000000000000000000000>:0
...
Reproduced with:
.Net 4.6
2017.1.1f1, 2017.3.0a7
iPad Mini 2 10.3.1, iPhone 6 Plus 8.0
Not reproducible with:
.Net 3.5
5.6.3p2 (feature was not introduced)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [Dragon Crashers] Build fails in U6
- [Dragon Crashers] 4 Shader error messages on import
- [Dragon Crashers] Readme text is white on light grey
- Cursor stays in front of the first character when entering text in the TextMeshPro field
- Searching in Hierarchy causes unwanted component calls
mcpepa
Jun 19, 2019 05:04
I'm still having this problem with 2018.2.21f
when I build with mono, emails are send and working just fine.
when I build with IL2CPP email system stop working.
alenwalker007
Jan 02, 2019 10:11
I was also facing the same SMTP error which was eventually fixed after visiting https://gmailtechnicalsupportnumbers.com/fix-gmail-error-codes-messages/ since it was a general SMTP server error so you can try checking the site and ask for help.
alenwalker007
Jan 02, 2019 10:10
I was also facing the same SMTP error which was eventually fixed after visiting https://gmailtechnicalsupportnumbers.com/fix-gmail-error-codes-messages/ since it was a general SMTP server error so you can try checking the site and ask for help.
dserebroDXC
Apr 26, 2018 01:05
Any chance this is also fixed in 2018.1?