Search Unity

[RELEASED] UTMail - Email Composition and Sending Plugin

Discussion in 'Assets and Asset Store' started by Yuriy-Ivanov, Jun 18, 2017.

  1. augmentaio

    augmentaio

    Joined:
    Jun 14, 2016
    Posts:
    8
    Hy Yuriy,

    Thanks for your reply. Do you have an idea or an approximate time, when we can expect this to be released?
    Thanks in advance!
    Best,
    Augmentaio
     
  2. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    495
    Hi @augmentaio,

    No, sorry, it's not really our priority right now. But this is exactly why we provide the complete source code (including the native plugins): feel free to add this handling to your version.

    Best regards,
    Yuriy, Universal Tools team.
     
  3. JamieSasson

    JamieSasson

    Joined:
    Jul 3, 2019
    Posts:
    3
    Hi Yuriy,

    We were thinking about using this plugin for an application on the Windows Store.
    We need to be able to attach a screenshot to the email and send it from Unity to the user.
    Does this plugin work for that? And have you guys tested on the Windows Store?

    Thanks a lot!

    - Jamie
     
  4. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    495
    Hi @JamieSasson,

    Yes, the asset allows sending and composing emails containing attachments, including attaching files, streams or byte buffers. UWP builds are supported too.

    Best regards,
    Yuriy, Universal Tools team.
     
  5. JamieSasson

    JamieSasson

    Joined:
    Jul 3, 2019
    Posts:
    3
    Thanks for the quick reply! Really appreciate the help!
     
  6. JamieSasson

    JamieSasson

    Joined:
    Jul 3, 2019
    Posts:
    3
    Hi @Yuriy-Ivanov ,

    One more quick question. My company specifically wanted the email to be sent from the user themselves. So for instance, if they sent it to a student, the email address that would send the screenshot would be their email address.

    Our question is, can this plugin change where the email comes from or open the user's default mailing app with the screenshot attached?

    Thank you,

    Jamie Sasson
     
  7. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    495
    Hi @JamieSasson,

    Yes, "composing" feature is exactly what you need. Please see https://universal-tools.github.io/UTMail/html_1.1/index.html.

    Best regards,
    Yuriy, Universal Tools team.
     
  8. better_walk_away

    better_walk_away

    Joined:
    Jul 12, 2016
    Posts:
    291
    Hi @Yuriy-Ivanov ,

    I have purchased this plugin, it is great and works most of the time! However, I couldn't receive the email that I sent using this plugin in my newly created Yandex mailbox. My Yandex email address is "jian.jia-ho@yandex.com". How can we fix this issue?

    Edit: I found that if the username contains "-", we cannot receive the email that we sent using this plugin, in this case, my username is "jian.jia-ho".

    Edit2: After an hour, I received the email in my Yandex mailbox "jian.jia-ho@yandex.com", but it was in Spam.

    On the other hand, I couldn't send email to my qq email address, "2638684461@qq.com", through this plugin. It shows an error message in the console when I try to send an email using this plugin:
    Code (CSharp):
    1. SmtpFailedRecipientsException: failed recipients
    2. UT.System.Net.Mail.SmtpClient+<>c__DisplayClass87_0.<SendAsync>b__0 (System.Object o, System.ComponentModel.DoWorkEventArgs ea) (at Assets/UniversalTools/UTMail/Src/Mono/System.Net.Mail/SmtpClient.cs:844)
    3. System.ComponentModel.BackgroundWorker.OnDoWork (System.ComponentModel.DoWorkEventArgs e) (at <0d3e94ab2a1c4d2a8582ccee7031f5c6>:0)
    4. System.ComponentModel.BackgroundWorker.WorkerThreadStart (System.Object argument) (at <0d3e94ab2a1c4d2a8582ccee7031f5c6>:0)
    5. UnityEngine.Debug:LogException(Exception)
    6. UT.<>c__DisplayClass5_1:<Send>b__0(Object, AsyncCompletedEventArgs) (at Assets/UniversalTools/UTMail/Src/Mail.cs:126)
    7. UT.System.Net.Mail.SmtpClient:OnSendCompleted(AsyncCompletedEventArgs) (at Assets/UniversalTools/UTMail/Src/Mono/System.Net.Mail/SmtpClient.cs:382)
    8. UT.System.Net.Mail.<>c__DisplayClass87_0:<SendAsync>b__1(Object, RunWorkerCompletedEventArgs) (at Assets/UniversalTools/UTMail/Src/Mono/System.Net.Mail/SmtpClient.cs:850)
    9. UnityEngine.UnitySynchronizationContext:ExecuteTasks()
    qq is used by most of the Chinese people, maybe there is an issue that is related to sending email to a Chinese email address?
     
    Last edited: Aug 10, 2019
  9. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    495
    Hi @better_walk_away,

    Sorry for the late reply. Honestly, I don't know what the deal with qq.com is, though SmtpFailedRecipientsException is produced based on your SMTP server's response to the client (UTMail), and it means that it failed to deliver the message to the specified email address
    : see https://docs.microsoft.com/en-us/do...iledrecipientsexception?view=netframework-4.8.
    You might try maybe to send an email to your own address at qq.com using its own SMTP server: it might contain a better error message in case it fails too.

    Best regards,
    Yuriy, Universal Tools team.
     
  10. Arjun-Gupte

    Arjun-Gupte

    Joined:
    May 31, 2013
    Posts:
    54
    Hello

    I am trying to build a MacOS version of our app and I'm using a few plugins to help with the app(Natcorder, UTMail and Unibill).

    I kept getting an error in the application loader when I was trying to validate the app
    This didn't go through the application loader.

    So, I tried to change the bundle identfiers of these to what we used for our app, and that made it go through the application loader, but it didn't get approved by apple with this mail sent as the issue report
    Can anyone help with these issue?
     
  11. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    495
    Hi @Arjun-Gupte,

    First of all, thank you for using our asset.

    I suggest you to update the bundle id of UTMail macOS native plugin by opening Assets/UniversalTools/UTMail/Src/OSX/utmail/utmail.xcodeproj with Xcode and then rebuilding it (please make sure the package is correctly signed with the same account that is used to sign your primary application).
    upload_2019-12-18_19-33-16.png

    Make sure Assets/UniversalTools/UTMail/Src/OSX/utmail/utmail.bundle gets updated as a result of a successful build. The new bundle id should be present in Assets/UniversalTools/UTMail/Src/OSX/utmail/utmail.bundle/Contents/Info.plist.

    It should help.

    You might need to do a similar thing with Unibill, please contact their support for more details.

    Best regards,
    Yuriy, Universal Tools team.
     
  12. Arjun-Gupte

    Arjun-Gupte

    Joined:
    May 31, 2013
    Posts:
    54
    Do I specifically change the bundle identifier to what we use for the app or leave it as it is?

    When I tried to do change the bundle identifier to what we use, I still have the same issue message sent from apple
    I have contacted unibill support for details on their side, but until they reply, I have just taken out unibill from the unity project.
     
  13. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    495
    Hi Arjun-Gupte,

    If you changed the bundle id and also signed it with correct certificate, the issue may be caused by .meta files present when building utmail.bundle: please make sure to close Unity and delete all .meta files from Assets/UniversalTools/UTMail/Src/OSX/utmail and its only subfolder before rebuilding it. Unity can also add .meta files to utmail.bundle itself (as it's a folder, they shouldn't be there): see https://forum.unity.com/threads/signing-mac-app-on-os-x-mavericks.206762/#post-2062138 and this whole thread for more details. You might also contact Unity support on getting ready a macOS Unity project containing native macOS plugins in .bundle for publishing in AppStore.

    Also, see https://docs.unity3d.com/Manual/HOWTO-PortToAppleMacStore.html - you need to follow that process to get published in the macOS AppStore.

    Best regards,
    Yuriy, Universal Tools team.
     
    Last edited: Dec 19, 2019
  14. Mox-Mind

    Mox-Mind

    Joined:
    Jan 12, 2016
    Posts:
    2
    Hello Team,

    I want to send the email with the attached .csv file on android.
    The file is already downloaded on mobile persistence datapath
    Does it work with your plugin?
    If yes will buy your product :)

    Thanks
    Vivek
     
  15. Yuriy-Ivanov

    Yuriy-Ivanov

    Joined:
    Jun 12, 2015
    Posts:
    495
    Hi @Mox-Mind,

    Yes, you can do it with UTMail. You can either send it with SMTP directly (you'll need to specify your SMTP credentials to the sending function in that case), or leverage email composition functionality, so the user sends a precomposed email with your attachment from their own email address, which lets you reply to them if needed.
    There are multiple ways you can attach data in UTMail, in your case the simplest should do just fine.

    Best regards,
    Yuriy, Universal Tools team.
     
  16. MotionBrain

    MotionBrain

    Joined:
    Dec 5, 2015
    Posts:
    35
    Hey,

    waiting for over a month for your answer. I'm gonna try it here once again.

    With enabling SSL

    Code (CSharp):
    1. lsException: Handshake failed - error code: UNITYTLS_INTERNAL_ERROR, verify result: UNITYTLS_X509VERIFY_NOT_DONE
    2. Mono.Unity.Debug.CheckAndThrow (Mono.Unity.UnityTls+unitytls_errorstate errorState, Mono.Unity.UnityTls+unitytls_x509verify_result verifyResult, System.String context, Mono.Security.Interface.AlertDescription defaultAlert) (at <480201908ed94ddaa0561e2e6e0ddd4e>:0)
    3. Mono.Unity.UnityTlsContext.ProcessHandshake () (at <480201908ed94ddaa0561e2e6e0ddd4e>:0)
    4. Mono.Net.Security.MobileAuthenticatedStream.ProcessHandshake (Mono.Net.Security.AsyncOperationStatus status) (at <480201908ed94ddaa0561e2e6e0ddd4e>:0)
    5. (wrapper remoting-invoke-with-check) Mono.Net.Security.MobileAuthenticatedStream.ProcessHandshake(Mono.Net.Security.AsyncOperationStatus)
    6. Mono.Net.Security.AsyncHandshakeRequest.Run (Mono.Net.Security.AsyncOperationStatus status) (at <480201908ed94ddaa0561e2e6e0ddd4e>:0)
    7. Mono.Net.Security.AsyncProtocolRequest+<ProcessOperation>d__24.MoveNext () (at <480201908ed94ddaa0561e2e6e0ddd4e>:0)
    8. --- End of stack trace from previous location where exception was thrown ---
    9. System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <695d1cc93cca45069c528c15c9fdd749>:0)
    10. System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) (at <695d1cc93cca45069c528c15c9fdd749>:0)
    11. System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) (at <695d1cc93cca45069c528c15c9fdd749>:0)
    12. System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) (at <695d1cc93cca45069c528c15c9fdd749>:0)
    13. System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () (at <695d1cc93cca45069c528c15c9fdd749>:0)
    14. Mono.Net.Security.AsyncProtocolRequest+<StartOperation>d__23.MoveNext () (at <480201908ed94ddaa0561e2e6e0ddd4e>:0)
    15. Rethrow as AuthenticationException: A call to SSPI failed, see inner exception.
    16. System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <695d1cc93cca45069c528c15c9fdd749>:0)
    17. Mono.Net.Security.MobileAuthenticatedStream+<ProcessAuthentication>d__47.MoveNext () (at <480201908ed94ddaa0561e2e6e0ddd4e>:0)
    18. Rethrow as AggregateException: One or more errors occurred.
    19. System.Threading.Tasks.Task.ThrowIfExceptional (System.Boolean includeTaskCanceledExceptions) (at <695d1cc93cca45069c528c15c9fdd749>:0)
    20. System.Threading.Tasks.Task.Wait (System.Int32 millisecondsTimeout, System.Threading.CancellationToken cancellationToken) (at <695d1cc93cca45069c528c15c9fdd749>:0)
    21. System.Threading.Tasks.Task.Wait () (at <695d1cc93cca45069c528c15c9fdd749>:0)
    22. Mono.Net.Security.MobileAuthenticatedStream.AuthenticateAsClient (System.String targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, System.Security.Authentication.SslProtocols enabledSslProtocols, System.Boolean checkCertificateRevocation) (at <480201908ed94ddaa0561e2e6e0ddd4e>:0)
    23. System.Net.Security.SslStream.AuthenticateAsClient (System.String targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, System.Security.Authentication.SslProtocols enabledSslProtocols, System.Boolean checkCertificateRevocation) (at <480201908ed94ddaa0561e2e6e0ddd4e>:0)
    24. UT.System.Net.Mail.SmtpClient.InitiateSecureConnection () (at Assets/UniversalTools/UTMail/Src/Mono/System.Net.Mail/SmtpClient.cs:1200)
    25. UT.System.Net.Mail.SmtpClient.SendCore (UT.System.Net.Mail.MailMessage message) (at Assets/UniversalTools/UTMail/Src/Mono/System.Net.Mail/SmtpClient.cs:643)
    26. UT.System.Net.Mail.SmtpClient.SendInternal (UT.System.Net.Mail.MailMessage message) (at Assets/UniversalTools/UTMail/Src/Mono/System.Net.Mail/SmtpClient.cs:534)
    27. UT.System.Net.Mail.SmtpClient.Send (UT.System.Net.Mail.MailMessage message) (at Assets/UniversalTools/UTMail/Src/Mono/System.Net.Mail/SmtpClient.cs:507)
    28. Rethrow as SmtpException: Message could not be sent.
    29. UT.System.Net.Mail.SmtpClient+<>c__DisplayClass87_0.<SendAsync>b__0 (System.Object o, System.ComponentModel.DoWorkEventArgs ea) (at Assets/UniversalTools/UTMail/Src/Mono/System.Net.Mail/SmtpClient.cs:851)
    30. System.ComponentModel.BackgroundWorker.OnDoWork (System.ComponentModel.DoWorkEventArgs e) (at <480201908ed94ddaa0561e2e6e0ddd4e>:0)
    31. System.ComponentModel.BackgroundWorker.WorkerThreadStart (System.Object argument) (at <480201908ed94ddaa0561e2e6e0ddd4e>:0)
    32. UnityEngine.Debug:LogException(Exception)
    33. UT.<>c__DisplayClass5_0:<Send>b__0(Object, AsyncCompletedEventArgs) (at Assets/UniversalTools/UTMail/Src/Mail.cs:126)
    34. UT.System.Net.Mail.SmtpClient:OnSendCompleted(AsyncCompletedEventArgs) (at Assets/UniversalTools/UTMail/Src/Mono/System.Net.Mail/SmtpClient.cs:386)
    35. UT.System.Net.Mail.<>c__DisplayClass87_0:<SendAsync>b__1(Object, RunWorkerCompletedEventArgs) (at Assets/UniversalTools/UTMail/Src/Mono/System.Net.Mail/SmtpClient.cs:857)
    36. UnityEngine.UnitySynchronizationContext:ExecuteTasks() (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/UnitySynchronizationContext.cs:107)
    when disabling SSL

    Code (CSharp):
    1. SmtpException: 530 5.7.0 User not authenticated
    2. UT.System.Net.Mail.SmtpClient+<>c__DisplayClass87_0.<SendAsync>b__0 (System.Object o, System.ComponentModel.DoWorkEventArgs ea) (at Assets/UniversalTools/UTMail/Src/Mono/System.Net.Mail/SmtpClient.cs:851)
    3. System.ComponentModel.BackgroundWorker.OnDoWork (System.ComponentModel.DoWorkEventArgs e) (at <480201908ed94ddaa0561e2e6e0ddd4e>:0)
    4. System.ComponentModel.BackgroundWorker.WorkerThreadStart (System.Object argument) (at <480201908ed94ddaa0561e2e6e0ddd4e>:0)
    5. UnityEngine.Debug:LogException(Exception)
    6. UT.<>c__DisplayClass5_0:<Send>b__0(Object, AsyncCompletedEventArgs) (at Assets/UniversalTools/UTMail/Src/Mail.cs:126)
    7. UT.System.Net.Mail.SmtpClient:OnSendCompleted(AsyncCompletedEventArgs) (at Assets/UniversalTools/UTMail/Src/Mono/System.Net.Mail/SmtpClient.cs:386)
    8. UT.System.Net.Mail.<>c__DisplayClass87_0:<SendAsync>b__1(Object, RunWorkerCompletedEventArgs) (at Assets/UniversalTools/UTMail/Src/Mono/System.Net.Mail/SmtpClient.cs:857)
    9. UnityEngine.UnitySynchronizationContext:ExecuteTasks() (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/UnitySynchronizationContext.cs:107)
     
  17. iMagesBlues

    iMagesBlues

    Joined:
    Mar 18, 2013
    Posts:
    76
    Working great until last week, and now receiving this error:
    "421 4.7.66 TLS 1.0 and 1.1 are not supported. Please upgrade/update your client to support TLS 1.2."

    Probably caused by a security upgrade from client's IT. Looking for suggestions. Thank you in advance