Null point exception when am using assert credential

Hello, good morning everyone
I get an error when am using credential can anyone help me


Source: Send SMTP Mail Message

Message: Value cannot be null.
Parameter name: password

Exception Type: System.ArgumentNullException

RemoteException wrapping System.ArgumentNullException: Value cannot be null.
Parameter name: password
at UiPath.Mail.Activities.SendMailActivity.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)

Chethan P

@copy_writes Can you let us know what is the Dependency Version of the Mail.Activities package ?


@copy_writes It seems that there is a Bug in the Send SMTP Mail Message Activity starting from the Mail.Activites Package versions 1.9.4- Preview to the latest ones at which point the SecurePassword Property was introduced.

However I am not sure of this entirely, but you could make use of the Password (String) Property that is available in the Activity until a real fix is done.

Maybe the UiPath Officials can provide a better answer related to this issue.

yes you are right because I use that in the test login form the value is a type but when am using this in the SMTP it’s not work I think it’s a bug @loginerror please help

Chethan P

I use this code to check the value I convert string secure to string new System.Net.NetworkCredential(string.Empty,StringPass).Password but
I get a null value why?

@copy_writes Can you replace String.Empty with Empty Quotes and check (“”) , Also is the Credential being retrieved from the Orchestrator ?

no, it’s not working still I get null value


new System.Net.NetworkCredential(“”,StringPass).Password

Chethan P

@copy_writes Can you expand the Assign Statement so that I could be able to look at the full expression, also Can you let us know what variable are you using in Get Credential as the Password Output ?

@copy_writes I think you would need to use strPass variable instead of the StringPass variable in the Assign Statement as you want to convert a SecurePassword (SecureString) to a String value.

Can you check and let us know the outcome ?


yes shit i didn’t notice that thank you very much both are string right i confuse
now its working so now we can use that in smtp activity this a way we can use secure password variable right! if we use credential directly we get error

Chethan P

1 Like

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