Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.
RevDotNet errors on send mail
Server is Windows 2016. When we have multiple email addresses in the sendto field we see a RevDotNet failure.
AI(Claude) tells me this is the problem. Other email with a single address in sendto seems to work okay. I have made sure that the string of addresses is separated by commas.
The error is being thrown while parsing an email address string into a System.Net.Mail.MailAddress object. Here's what's happening:
The header in question: Based on the stack trace, SRPMail.Message.StringToAddress(String s) is taking a string and passing it directly into the single-address MailAddress constructor:
at SRPMail.Message.StringToAddress(String s)
at SRPMail.Message..ctor(String message, String body, String licenseText, String licenseHtml)
The comma character it's complaining about is coming from the recipient list shown at the bottom of your log:
kareng@shoesforcrews.com,daisy@shoesforcrews.com,aldof@shoesforcrews.com
Why it fails: System.Net.Mail.MailAddress's constructor (the one used by MailAddressParser.ParseAddress) expects a single email address, not a comma-separated list. When SRPMail.Message.StringToAddress tries to build one MailAddress object out of that whole comma-separated string, the parser reads up to the first comma, then chokes because a comma is not a valid character within a single address/header value — hence "invalid character was found in the mail header: ','".
Likely fix, depending on where you have access to modify this:
If this is in SRPMail's source code, StringToAddress needs to split the string on commas first and construct a MailAddress for each recipient (adding each to a MailAddressCollection, e.g., MailMessage.To.Add(...) per address), rather than passing the entire multi-address string to a single MailAddress constructor.
If SRPMail is a black-box/compiled library you can't edit, check whether it has a separate method or delimiter convention for multiple recipients (some mail wrapper libraries expect semicolons ; instead of commas, or expect you to call an "AddRecipient" method once per address rather than passing a combined string).
AI(Claude) tells me this is the problem. Other email with a single address in sendto seems to work okay. I have made sure that the string of addresses is separated by commas.
The error is being thrown while parsing an email address string into a System.Net.Mail.MailAddress object. Here's what's happening:
The header in question: Based on the stack trace, SRPMail.Message.StringToAddress(String s) is taking a string and passing it directly into the single-address MailAddress constructor:
at SRPMail.Message.StringToAddress(String s)
at SRPMail.Message..ctor(String message, String body, String licenseText, String licenseHtml)
The comma character it's complaining about is coming from the recipient list shown at the bottom of your log:
kareng@shoesforcrews.com,daisy@shoesforcrews.com,aldof@shoesforcrews.com
Why it fails: System.Net.Mail.MailAddress's constructor (the one used by MailAddressParser.ParseAddress) expects a single email address, not a comma-separated list. When SRPMail.Message.StringToAddress tries to build one MailAddress object out of that whole comma-separated string, the parser reads up to the first comma, then chokes because a comma is not a valid character within a single address/header value — hence "invalid character was found in the mail header: ','".
Likely fix, depending on where you have access to modify this:
If this is in SRPMail's source code, StringToAddress needs to split the string on commas first and construct a MailAddress for each recipient (adding each to a MailAddressCollection, e.g., MailMessage.To.Add(...) per address), rather than passing the entire multi-address string to a single MailAddress constructor.
If SRPMail is a black-box/compiled library you can't edit, check whether it has a separate method or delimiter convention for multiple recipients (some mail wrapper libraries expect semicolons ; instead of commas, or expect you to call an "AddRecipient" method once per address rather than passing a combined string).

Comments
Return Code = RevDotNet Error: No method found that matches this requestþ,
It is inconsistent in that a lot of email goes through some don't, but in almost all cases this is the error.
Return Code = RevDotNet Error: Invalid control specified,
It kind of points to the data that we are passing or how the email addresses are placed. For example in some cases the from address was being left null. Problem is that I don't know yet, got pulled to another issue, if that was triggering it. Also many of the sendto, cc and bcc addresses could be multiple and the replyto No consistence with them. Any suspects there? What about body?
I just need some clues. Following are what I was told were the .net versions. The servers tsk11,12,13 are new ones and right now are not in the mix of problems. But that should be the newest .NET code.
This is breaking at the RevDotNet level. It's failing to find the SendMail method that is inside the SRPMail.dll. If you are convinced that this is related to email addresses or some other configuration, then I recommend logging the complete configuration for all failed sends. Only then can we determine if there's any commonality that I could perhaps use on my end to reproduce.
I am not convinced of anything except it is causing some excitement. I will fill you in later, maybe through Don.