Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

  • 0
Sign in to follow this  
Logystone

Email send c#

Question

Hello everyone,

This script i have found it from @geckoo, Thank you very much

Please login or register to see this code.

I have 2 questions : does it works on android too ? 

How can i know if the email has been sent or no?

like if(....)
 

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

I think that it doesn't work on mobile device because of security protocol - but I guess only. I didn't tested it...

If you cannot send your mail for any reason, you have an error message which gives you an information :

SmtpException: 535-5.7.8 Username and Password not accepted. Learn more at (link) - bad user name or password,

Socket Exception (bla bla) - smtp is not reachable, wrong port, etc.

In other case, you can see the final message "success"...

 

For more information about exception and how you can catch them using its status code, take a look at the link below ++

Please login or register to see this link.

 

 

 

 

Share this post


Link to post
Share on other sites

  • 0

To see if it’s sent, you can just surround it in a try catch and it should notify you if it fails

 

try

{

smtpServer.Send(mail);

}

catch(SmtpFailedRecipientException e)

{

Debug.LogError(“Failed to send!”);

}

 

edit: psh, didn’t even read the last part of geckoos reply

Share this post


Link to post
Share on other sites
  • 0

Do you have a webserver ?

If not you could host a free and make all that stuff on php side. It is more easier

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...