# BPM runtime caught an unexpected exception of 'FormatException' type

**URL:** <https://www.epiusers.help/t/bpm-runtime-caught-an-unexpected-exception-of-formatexception-type/82334>\
**Category:** Epicor ERP 10\
**Tags:** bpm\
**Created:** [September 7, 2021, 4:53am UTC](https://www.epiusers.help/t/bpm-runtime-caught-an-unexpected-exception-of-formatexception-type/82334 "2021-09-07T04:53:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fernando\_Siboro](https://www.epiusers.help/user_avatar/www.epiusers.help/fernando_siboro/32/23368_2.png) [@Fernando\_Siboro](https://www.epiusers.help/u/Fernando_Siboro)\
**Post date:** [September 7, 2021, 4:53am UTC](https://www.epiusers.help/t/bpm-runtime-caught-an-unexpected-exception-of-formatexception-type/82334/1 "2021-09-07T04:53:09Z")

</div>

I get this error when I customization for the notification email;

please help?

BPM runtime caught an unexpected exception of the ‘FormatException’ type.  
See more info in the Inner Exception section of Exception Details.

Exception caught in: Epicor.ServiceModel

# Error Detail

Description: BPM runtime caught an unexpected exception of ‘FormatException’ type.  
See more info in the Inner Exception section of Exception Details.  
Program: System.dll  
Method: ParseLocalPart  
Original Exception Type: FormatException  
Framework Method: b\_\_0  
Framework Line Number: 123  
Framework Column Number: 21  
Framework Source: b\_\_0 at offset 143 in file:line:column c:\_Releases\ICE\3.1.600.0\Source\Framework\Epicor.Ice\Mail\SmtpMailer.cs:123:21

Server Trace Stack: at System.Net.Mail.MailAddressParser.ParseLocalPart(String data, Int32& index, Boolean expectAngleBracket, Boolean expectMultipleAddresses)  
at System.Net.Mail.MailAddressParser.ParseAddress(String data, Boolean expectMultipleAddresses, Int32& index)  
at System.Net.Mail.MailAddressParser.ParseMultipleAddresses(String data)  
at System.Net.Mail.MailAddressCollection.ParseValue(String addresses)  
at Ice.Mail.SmtpMailer.\<\>c\_\_DisplayClass10\_0.b\_\_0(MailMessage acc, String next) in c:\_Releases\ICE\3.1.600.0\Source\Framework\Epicor.Ice\Mail\SmtpMailer.cs:line 123  
at System.Linq.Enumerable.Aggregate[TSource,TAccumulate](IEnumerable1 source, TAccumulate seed, Func3 func)  
at Ice.Mail.SmtpMailer.ConvertToMailMessage(SmtpMail message) in c:\_Releases\ICE\3.1.600.0\Source\Framework\Epicor.Ice\Mail\SmtpMailer.cs:line 118  
at Ice.Mail.SmtpMailer.SendCore(SmtpMail message, IEnumerable`1 attachments) in c:\_Releases\ICE\3.1.600.0\Source\Framework\Epicor.Ice\Mail\SmtpMailer.cs:line 92 at Epicor.Customization.Bpm.DBB3E86FDB8EC8425BA952D8258DB940FE.InTranDirective_SendEmailToPurchasing_7CC56E12749447F4A5BB7D6A21872004.A001_CustomCodeAction() at Epicor.Customization.Bpm.DBB3E86FDB8EC8425BA952D8258DB940FE.InTranDirective_SendEmailToPurchasing_7CC56E12749447F4A5BB7D6A21872004.ExecuteCore() at Epicor.Customization.Bpm.DirectiveBase`3.Execute(TParam parameters) in c:\_Releases\ICE\3.1.600.0\Source\Server\Internal\Lib\Epicor.Customization.Bpm\DirectiveBase.Generic.cs:line 129

# Client Stack Trace

at Epicor.ServiceModel.Channels.ImplBase`1.ShouldRethrowNonRetryableException(Exception ex, DataSet[] dataSets) at Erp.Proxy.BO.POSuggImpl.Generate(POSuggDataSet ds, String ipPlantKey, String ipCurBuyer, Nullable`1 ipCutOffDate)  
at Erp.Adapters.POSuggAdapter.Generate(String ipPlantKey, String ipCurBuyer, Nullable`1 ipCutOffDate)

# Inner Exception

An invalid character was found in the mail header: ‘;’.

---

<div class="post-metadata">

**Author:** ![hmwillett](https://www.epiusers.help/user_avatar/www.epiusers.help/hmwillett/32/93207_2.png) [@hmwillett](https://www.epiusers.help/u/hmwillett)\
**Post date:** [September 7, 2021, 11:10am UTC](https://www.epiusers.help/t/bpm-runtime-caught-an-unexpected-exception-of-formatexception-type/82334/2 "2021-09-07T11:10:08Z")

</div>

Do you have custom code?

---

<div class="post-metadata">

**Author:** ![SAD](https://www.epiusers.help/user_avatar/www.epiusers.help/sad/32/22683_2.png) [@SAD](https://www.epiusers.help/u/SAD)\
**Post date:** [September 7, 2021, 11:27am UTC](https://www.epiusers.help/t/bpm-runtime-caught-an-unexpected-exception-of-formatexception-type/82334/3 "2021-09-07T11:27:32Z")

</div>

Based on the exception, I’d assume that you incorrectly filled one of the address fields (from, to, cc, reply, etc.).
