Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have set up an email node with a valid sender and the test email function works as expected via the gui.
Experimenting with the package under 7.2.8 I receive an exception when trying to send an email via code.
I have entered [#to#] in the "To" Email and Name fields under the given mail node settings.
My (simplified) code looks like this:
var listOfTags = new List<EmailTag>();
listOfTags.Add(new EmailTag("to", "firstname.lastname@example.org"));
And the resulting exception is:
` Kon geen primaire ontvanger voor de e-mail bepalen: Stel een 'to', 'cc' of 'bcc' ontvanger in.`
Debugger confirms that all fields have values. Can you hint at a solution?
Thanks for trying out our package!
It appears the tag in the TO field didn't always get parsed properly. I have made a change to the PerplexMail library which should fix this issue.
Jeffrey will upload the updated package tomorrow, so if you check back later you should see the new version ready for download.
To fix this issue in your current solution, simply download the new version of the package and replace the /bin/perplexmail.dll file in your solution with the new .dll from the package zip file. Mind that the name of the file is random but you can find it by it's extension (.dll). Simply copy it to your /bin/ folder and rename it to PerplexMail.dll.
Thanks for the fast reply and fix! Looking forward to experimenting more with the package!
Btw. Exception messages in English would be a plus! :)
as promised by Wouter I uploaded the package with the fix :).
As for English exception messages and the NuGet package (mentioned in your tweet) we will work on that!
Thanks! It looks like it is working as expected. Looking forward to see future versions then! :)
I seem to get the same error, this is with the .dll from the 4/9/2015 16:53 and in umbraco 7.2.8.
The exception is:Additional information: Could not determine the primary recipient for the email. Please specify a 'to', 'cc' or 'bcc' recipient.
Additional information: Could not determine the primary recipient for the email. Please specify a 'to', 'cc' or 'bcc' recipient.
My code is pretty much this:
var listOfTags = new List<PerplexMail.EmailTag>
new PerplexMail.EmailTag("to", "email@example.com"),
new PerplexMail.EmailTag("firstname", "Jeffrey"),
new PerplexMail.EmailTag("content", "Cool package!")
first of all thanks for trying out our package :)
Second: Did you specify [#to#] in the to-field in Umbraco, on a global or specific mail-node? Like this:
I had not done that. And setting that up helped
perfect! There's no magic going on there. It's just two keys and in your code you're specifying which tags should be replaced.
You also could have used [#foobar#] and new PerplexMail.EmailTag("foobar", "firstname.lastname@example.org")
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted