Gmail execution errors

Hi everyone,
I had this this probleme Send Email: An error occured in the activity.


I tried to copy the sequence in the other project and the same thing.
Help please.

@noussair_prof

Can you please open locals panel and open exception details from there…it would provide more details about the error

Cheers

23.6.1-beta.13324+Branch.release-v23.6.1.Sha.52787b786620e97cba5555379da6e6bb423b3e6b

Source: Send Email

Message: An error occured in the activity.

Exception Type: UiPath.GSuite.Exceptions.GSuiteException

UiPath.GSuite.Exceptions.GSuiteException: An error occured in the activity. —> UiPath.GSuite.Exceptions.GSuiteInternalException: An invalid character was found in the mail header: ‘"’. —> System.FormatException: An invalid character was found in the mail header: ‘"’. at System.Net.Mail.DotAtomReader.TryReadReverse(String data, Int32 index, Int32& outIndex, Boolean throwExceptionIfFail)
at System.Net.Mail.MailAddressParser.TryParseDomain(String data, Int32& index, String& domain, Boolean throwExceptionIfFail)
at System.Net.Mail.MailAddressParser.TryParseAddress(String data, Boolean expectMultipleAddresses, Int32& index, ParseAddressInfo& parseAddressInfo, Boolean throwExceptionIfFail)
at System.Net.Mail.MailAddressParser.ParseMultipleAddresses(String data)
at System.Net.Mail.MailAddressCollection.ParseValue(String addresses)
at System.Net.Mail.MailAddressCollection.Add(String addresses)
at UiPath.Shared.Api.Google.Gmail.MimeKitMail.MailMessageBuilder.AddRecipientsToMail(MailAddressCollection addressesCollection, List1 recipients) at UiPath.GSuite.Gmail.Services.GmailServiceProxy.SendEmailAsync(SendEmailRequest sendEmailRequest, CancellationToken cancellationToken) at UiPath.GSuite.Activities.SendEmailConnections.SafeExecuteAsync(AsyncCodeActivityContext context, CancellationToken cancellationToken) at UiPath.GSuite.Activities.BaseLeafConnectionServiceActivityWithoutBindings.ExecuteAsync(AsyncCodeActivityContext context, CancellationToken cancellationToken) --- End of inner exception stack trace --- at System.Net.Mail.DotAtomReader.TryReadReverse(String data, Int32 index, Int32& outIndex, Boolean throwExceptionIfFail) at System.Net.Mail.MailAddressParser.TryParseDomain(String data, Int32& index, String& domain, Boolean throwExceptionIfFail) at System.Net.Mail.MailAddressParser.TryParseAddress(String data, Boolean expectMultipleAddresses, Int32& index, ParseAddressInfo& parseAddressInfo, Boolean throwExceptionIfFail) at System.Net.Mail.MailAddressParser.ParseMultipleAddresses(String data) at System.Net.Mail.MailAddressCollection.ParseValue(String addresses) at System.Net.Mail.MailAddressCollection.Add(String addresses) at UiPath.Shared.Api.Google.Gmail.MimeKitMail.MailMessageBuilder.AddRecipientsToMail(MailAddressCollection addressesCollection, List1 recipients)
at UiPath.GSuite.Gmail.Services.GmailServiceProxy.SendEmailAsync(SendEmailRequest sendEmailRequest, CancellationToken cancellationToken)
at UiPath.GSuite.Activities.SendEmailConnections.SafeExecuteAsync(AsyncCodeActivityContext context, CancellationToken cancellationToken)
at UiPath.GSuite.Activities.BaseLeafConnectionServiceActivityWithoutBindings.ExecuteAsync(AsyncCodeActivityContext context, CancellationToken cancellationToken)
— End of inner exception stack trace —
at UiPath.GSuite.Activities.BaseLeafConnectionServiceActivityWithoutBindings.ExecuteAsync(AsyncCodeActivityContext context, CancellationToken cancellationToken)
at UiPath.Shared.Activities.AsyncTaskCodeActivityImplementation.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at UiPath.Shared.Activities.AsyncTaskCodeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

@noussair_prof

I guess the email id you provided contains double quotes please remove them and it should work as expected

If you give the mail id directly no need to enclose in double quotes…if you open the advamced editoe and then give the mail id then double quotes are needed

Hope this helps

Cheers

thank you for your help!!!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.