Hi i got an error: SmtpException: 535-5.7.8 Username and Password not accepted my email and password are correct and google also send me a msg that a third party app is trying to access your gmail and i said 'Yes it was me' but still it's not sending msg , i think i have to change some setting in gmail for allowing access , but i don't know what to do. please help
Hello, there's a setting in gmail to allow a 3rd party app. support.google.com/accounts/answer/3466521?hl=en You'll have to enable 3rd party access for your app to work with gmail.
@@wolfscrygames When I tried to do this - there was a message saying that this setting will be depracated May 30 2022. I guess this will not work after that date..?
This tutorial works fine for me. But now Google stopped the less secure apps, so the email from unity apps wont be send. Any alt email for that purpose ?
Thanks for Amazing and very helpful tutorial. it saves a lot of my time. 1 question I just want to ask what code we should add if the email is successfully send or not?
Thanks for the tutorial. Just wanted to ask what the code line is if you have a fixed email to send the emails to. So eliminating the email input field and have the email sent to a predetermined address.
how about a button with values that when clicked, the btn will send message to a phone number,,, meaning that the message is fixed and stored in the button itself? will it work?
@@kiddoryandee6714 you need to write a method with the fixed values you need. Then, assign that method to the button. The email you send it to depends on the carrier. If you have your own mail server, you can try sending it to all carriers without checking, but I'm not sure if that has any long term effects from the receiving end.
4 года назад+1
Hello, I have a problem. It works through Unity editor when I play the game, but when I build the project for PC and play again (out of Unity) it stops working. I would appreciate if you could help me. Thanks!
4 года назад
I eventually got same result by creating a form and capturing the information through a php file hosted on a server which will send all the information to my email.
hey i am getting this error could you tell me what i could be doing wrong : NullReferenceException: Object reference not set to an instance of an object EmailFactory.SendEmail() (at Assets/EmailFactory.cs:23) Line 23 is : mail.To.Add(new MailAddress(recipientEmail.text)); Any ideas why its giving me this error just to reduce the error i did everything the same as you did used the same names and everything still this is a persistent error for me
@@wolfscrygames could you take anydesk for a bit and see what i could be doing wrong i am fairly new to unity and visual studio *basically a noob* Anydesk
@@wolfscrygames It was a really big help i never though i would get it to work i am really grateful that i came to your channel Thank you a million times i have been banging my head with this for 2 days and since i didnt know unity i had no idea that i had to drag and drop the textfields :) *Thumbs Up*
Doesn't work for me. Unity freezes for like a minute after I click the button and then I get error: "IOException: Connection closed System.Net.Mail.SmtpClient.Read () "
Hi, great tutorial! Can you do a video on Authentication? Something like OAuth? I want the users to be able to send emails with their accounts from my app.
Thanks for making this tutorial! I'm having a problem with the text input and wonder if anyone can help. It works well if I type the recipient email address directly into the the editor or as a string in the script but it doesn't work when I use the input field. I get the error SmtpFailedRecipientsException: failed recipients. Entering text into the input field seems to be working normally. Anyone else have the same problem or have an idea of what I'm missing?
Hello, There's a weird behavior with input fields that are too small where it cuts off the end of the string. Try making the text area larger and see how that goes.
@@wolfscrygames Wow, thanks for the fast response! I tried making the input field bigger but it doesn't seem to make a difference. I added a line to copy what I have in the input box to the console and everything seems to be correct.
Hi I got this error: FormatException: The specified string is not in the form required for an e-mail address. System.Net.Mail.MailAddress.ParseAddress (System.String address) (at :0). This error pops out when I click on "Send" button
Hello, Since it's C# based, yes, it works in any environment as long as internet connection is available. If a quest 1 is being used, or quest for business, it's not accurate to assume the user is connected. Quest 2 has a reasonable assumption of internet connectivity since Facebook login is required.
Hi, Thank you so much for the tutorial. I have followed your tutorial to send an email for my Unity Pc application. I am getting the following Exception while sending email request : SmtpException: Server does not support secure connections. I have enabled Less secure app access permission in my Gmail settings. Can you please provide a solution for this exception. Thank you.
Hello, Unfortunately, I don't have a solution for that issue other than suggesting you host a mail server of your own. There may be regional differences, or updates as time progresses, that cause this code to have different requirements.
How could it be done that instead of sending the email or message, just open the mobile application, the telephone keyboard or the WhatsApp application through a button with some default data, it would be for a business card in augmented reality, made with Unity 3d and vuforia. Thanks in advance for your help and best regards.
Hello when i running it in editor everthing works fine but when i use Build & Run option and it opens in broswer(Chrome) it doesnt sends the mail and gives my socketexception Please Help
Hello, WebGL builds do not retain full functionality like standalone builds. Every browser and every operating system will handle them differently and many features are lost. This is the extent of my knowledge on the solution to your issue. I'd advise finding a website based solution.
@@wolfscrygames i found this written in a forum this Wink00 says : "You can have Unity WebGL call a javascript function which then calls PHP and send the email." but i dont understand what he means by it
@@wolfscrygames i worked last 6 hours and created a WebAPI to send emails and used that with the unity and it works great in editor but i am getting different error in browser i have sent you debug.txt file on your discord could you please take a look and tell my what i might be doing wrong?
If you have a custom server, I believe you would just need to update the server address. Instead of smtp.gmail.com, you would use your email server's address.
I was able to get it to work using a Google email and changing the settings on gmail. It should also work with a custom email if you have your own server.
how to send email to all the email address at same time not just particular one like this video its gmail how to make it work for all mail addresses at same time like google yahooo hotmail etc..
I think you misunderstand. This one just shows gmail as a "from" address, but you can send to multiple addresses. You may want to look into loops and lists to learn how to work with more than one item at a time.
@@wolfscrygames ya sorry my bad i misunderstood this i tryed it in my project and it worked great thanks for the video now i am thinking of trying to send mail from my own custom server not gmail yahoo etc ...
@@wolfscrygames i want to use this method to generate random code and send it to the user's email for verification of email address is this practice good for this approach is it a secure way?
I've seen confirmation codes and links sent in emails. Both methods are prevalent and fairly effective at validating email addresses. As long as your email does NOT prompt any sort of login, and does not lead users to a webpage where they may login, it's fine. An email link, when used, should make an http request. It should not resemble phishing in any way.
Sorry for the late reply, I don't get notifications sometimes (rather often actually). You can combine multiple variables into one string, then use that for the body. I'm sure you already figured that out, but just in case, I figured I'd drop a comment.
@@DGoncerz yes, if you have multiple string variables, you can simply add them. string firstString = "chocolate"; string secondString = "covered"; string sum = firstString + secondString; At this point, sum is "chocolatecovered"
Me costo trabajo porque ahora cambiaron la seguridad de gmail, Nota: utiliza el mismo usuario y copia la contraseña. Aquí te dejo un link para que veas de como modificarlo ruclips.net/video/yuT6PhH-5iw/видео.html y para el bro que subio este video bendito sea joven, desde colombia. Another programmer.
Are u real or fake because i play ur games and theres a lot of advertisement how come that when i log in ur games to claim my reward i cannot open the games
Hi i got an error: SmtpException: 535-5.7.8 Username and Password not accepted
my email and password are correct and google also send me a msg that a third party app is trying to access your gmail and i said 'Yes it was me' but still it's not sending msg , i think i have to change some setting in gmail for allowing access , but i don't know what to do. please help
Hello, there's a setting in gmail to allow a 3rd party app. support.google.com/accounts/answer/3466521?hl=en
You'll have to enable 3rd party access for your app to work with gmail.
myaccount.google.com/lesssecureapps this is the direct link to the setting you need to change
@@wolfscrygames Thank you so much for this direct link , now email sends perfectly
@@wolfscrygames When I tried to do this - there was a message saying that this setting will be depracated May 30 2022.
I guess this will not work after that date..?
@@Dweeh This video will help with setting up two step authentication and a random pw. ruclips.net/video/IWxwWFTlTUQ/видео.html
It's 2022. This tutorial remain as one of recommended video. Thanks for the great work!
It's 2024. This method still works. Thanks for your video~
it did not work with me. google refuses to work.
This tutorial works fine for me. But now Google stopped the less secure apps, so the email from unity apps wont be send. Any alt email for that purpose ?
Looking for this answer too
Hi, did you figured it out?
Thanks for Amazing and very helpful tutorial. it saves a lot of my time. 1 question I just want to ask what code we should add if the email is successfully send or not?
i tried my carrier destination of my country but is not working
Thank you for the tutorial Dr.Strange :D
Glad to be of service
Amazing tutorial, thank you so much, very very very helpful for me, thank you so much. .. 🙏👍👍
Glad to be of service!
thanks dude, you rock!
Thanks for the tutorial. Just wanted to ask what the code line is if you have a fixed email to send the emails to. So eliminating the email input field and have the email sent to a predetermined address.
Instead of using the recipientemail.text, you can assign a string. This will be the mail.To.Add(new MailAddress(toAddress@yahoo.com));
hello man am suffering with text messege can you help me adress not found
how about a button with values that when clicked, the btn will send message to a phone number,,, meaning that the message is fixed and stored in the button itself? will it work?
Yes, this will work, but you'd preferably need to know the user's carrier otherwise if you brute force it most of the emails get a failed to send
@@wolfscrygames im still stuck with this process, do you know how to code it so this will work?
@@wolfscrygames or make a tutorial for this issue
@@kiddoryandee6714 you need to write a method with the fixed values you need. Then, assign that method to the button. The email you send it to depends on the carrier. If you have your own mail server, you can try sending it to all carriers without checking, but I'm not sure if that has any long term effects from the receiving end.
Hello, I have a problem. It works through Unity editor when I play the game, but when I build the project for PC and play again (out of Unity) it stops working. I would appreciate if you could help me. Thanks!
I eventually got same result by creating a form and capturing the information through a php file hosted on a server which will send all the information to my email.
Try to enable internet access from auto to require.
You can find it under player setting->other settings.
hey i am getting this error could you tell me what i could be doing wrong :
NullReferenceException: Object reference not set to an instance of an object EmailFactory.SendEmail() (at Assets/EmailFactory.cs:23)
Line 23 is : mail.To.Add(new MailAddress(recipientEmail.text));
Any ideas why its giving me this error just to reduce the error i did everything the same as you did used the same names and everything still this is a persistent error for me
Seems like your recipient email string is null. This could be due to you not dragging the text gameObject into the slot in the editor.
@@wolfscrygames could you take anydesk for a bit and see what i could be doing wrong i am fairly new to unity and visual studio *basically a noob* Anydesk
@@wolfscrygames It was a really big help i never though i would get it to work i am really grateful that i came to your channel Thank you a million times i have been banging my head with this for 2 days and since i didnt know unity i had no idea that i had to drag and drop the textfields :) *Thumbs Up*
Doesn't work for me. Unity freezes for like a minute after I click the button and then I get error: "IOException: Connection closed
System.Net.Mail.SmtpClient.Read () "
Does this work on unity WebGL builds? please reply fast!
amazing and very helpful tutorial thank you very much!!!!
Glad to be of service!
Hi, great tutorial! Can you do a video on Authentication? Something like OAuth? I want the users to be able to send emails with their accounts from my app.
I did all that is on the tutorial, yet when i click it does not send any email to my designated mail. There are also no errors in the console. Help?
I also have the less secure apps access on. I dont know what to do further.
Thanks for making this tutorial! I'm having a problem with the text input and wonder if anyone can help. It works well if I type the recipient email address directly into the the editor or as a string in the script but it doesn't work when I use the input field. I get the error SmtpFailedRecipientsException: failed recipients. Entering text into the input field seems to be working normally. Anyone else have the same problem or have an idea of what I'm missing?
Hello,
There's a weird behavior with input fields that are too small where it cuts off the end of the string. Try making the text area larger and see how that goes.
@@wolfscrygames Wow, thanks for the fast response! I tried making the input field bigger but it doesn't seem to make a difference. I added a line to copy what I have in the input box to the console and everything seems to be correct.
Hi I got this error: FormatException: The specified string is not in the form required for an e-mail address.
System.Net.Mail.MailAddress.ParseAddress (System.String address) (at :0). This error pops out when I click on "Send" button
Thanks a lot. So easy. You made my day.
Glad it helped!
Thanks for your great Tut! How can i receive emails in to unity?
Hi does the sending of the email also work under VR-Platform - Oculus Quest...
Hello,
Since it's C# based, yes, it works in any environment as long as internet connection is available. If a quest 1 is being used, or quest for business, it's not accurate to assume the user is connected. Quest 2 has a reasonable assumption of internet connectivity since Facebook login is required.
Hi, Thank you so much for the tutorial. I have followed your tutorial to send an email for my Unity Pc application.
I am getting the following Exception while sending email request :
SmtpException: Server does not support secure connections.
I have enabled Less secure app access permission in my Gmail settings.
Can you please provide a solution for this exception.
Thank you.
Hello,
Unfortunately, I don't have a solution for that issue other than suggesting you host a mail server of your own. There may be regional differences, or updates as time progresses, that cause this code to have different requirements.
@@wolfscrygames Thank you very much! Is there any other alternative way to send emails from Unity.
Would this still work on a desktop build?
For webgl it is not working help
Thank you for your video !
How could it be done that instead of sending the email or message, just open the mobile application, the telephone keyboard or the WhatsApp application through a button with some default data, it would be for a business card in augmented reality, made with Unity 3d and vuforia. Thanks in advance for your help and best regards.
You have to look into the documentation for each operating system to open applications. It'll be different on ios and on Android.
Hello when i running it in editor everthing works fine but when i use Build & Run option and it opens in broswer(Chrome) it doesnt sends the mail and gives my socketexception Please Help
Hello,
WebGL builds do not retain full functionality like standalone builds. Every browser and every operating system will handle them differently and many features are lost. This is the extent of my knowledge on the solution to your issue. I'd advise finding a website based solution.
@@wolfscrygames
i found this written in a forum this Wink00 says : "You can have Unity WebGL call a javascript function which then calls PHP and send the email." but i dont understand what he means by it
@@AGeek it means you can use a traditional method for sending an email on a website. PHP is a bit more secure than html. Sockets probably wont work.
@@wolfscrygames i worked last 6 hours and created a WebAPI to send emails and used that with the unity and it works great in editor but i am getting different error in browser i have sent you debug.txt file on your discord could you please take a look and tell my what i might be doing wrong?
@@wolfscrygames both are my ids i am the same person ageek please take a look in discord
it works amazing, thank you!
Unfortunately "This setting is not available for your account."
Do you make a tutorial about how to send email with a more secure custom server?
If you have a custom server, I believe you would just need to update the server address. Instead of smtp.gmail.com, you would use your email server's address.
I get the error: "server does not support secure connections" any ideas on how to fix this?
I was able to get it to work using a Google email and changing the settings on gmail. It should also work with a custom email if you have your own server.
@@wolfscrygames ok thank you! great tutorial btw
@@acursedhope thanks, hope it helps
how to send email to all the email address at same time not just particular one like this video its gmail how to make it work for all mail addresses at same time like google yahooo hotmail etc..
I think you misunderstand. This one just shows gmail as a "from" address, but you can send to multiple addresses. You may want to look into loops and lists to learn how to work with more than one item at a time.
@@wolfscrygames ya sorry my bad i misunderstood this i tryed it in my project and it worked great thanks for the video now i am thinking of trying to send mail from my own custom server not gmail yahoo etc ...
@@wolfscrygames i want to use this method to generate random code and send it to the user's email for verification of email address is this practice good for this approach is it a secure way?
I've seen confirmation codes and links sent in emails. Both methods are prevalent and fairly effective at validating email addresses.
As long as your email does NOT prompt any sort of login, and does not lead users to a webpage where they may login, it's fine.
An email link, when used, should make an http request. It should not resemble phishing in any way.
@@wolfscrygames ok got it once again thanks for reply !
Really nice tutorial i love it!!! one question, can you Sent one email with more bodys, Like Name: + Last Name: + Hobbys:
Sorry for the late reply, I don't get notifications sometimes (rather often actually). You can combine multiple variables into one string, then use that for the body. I'm sure you already figured that out, but just in case, I figured I'd drop a comment.
@@DGoncerz yes, if you have multiple string variables, you can simply add them.
string firstString = "chocolate";
string secondString = "covered";
string sum = firstString + secondString;
At this point, sum is "chocolatecovered"
it doesn't work anymore :(
Not working , because Gmail disabled less secure system for more security 🤦
Hi, did you figured it out by any chance?
Me costo trabajo porque ahora cambiaron la seguridad de gmail, Nota: utiliza el mismo usuario y copia la contraseña. Aquí te dejo un link para que veas de como modificarlo ruclips.net/video/yuT6PhH-5iw/видео.html y para el bro que subio este video bendito sea joven, desde colombia. Another programmer.
Are u real or fake because i play ur games and theres a lot of advertisement how come that when i log in ur games to claim my reward i cannot open the games
ty
Are u real o fake