I change $ecardEmailTo for my email, so it can't be duplicate recipients. In my xslt, there's only one instance of sendmail and the macro is called only one on my textpage.
That's a strange one... haven't heard of this before. My feeling is that it might be a mail server / config issue? (but can't say with any certainy, sorry).
Taking a long-shot here... could you try changing the last parameter (IsHtml) to use a boolean (rather than a string)?
Like Lee says, this sounds very strange. Maybe you could show us your whole XSLT code for this file. There might be something else going on somewhere else in the file. I know it's a long shot, but just to be absolutely sure :)
So the macro is inserted in a textpage and call xslt below. In Contour users fill a form (ecard.aspx), then they are redirected to ecard-post.aspx. On this page, there's a view of the ecard that is send to receiver.
I know this is a really old thread, but just for the record... I thought I had this just now. The system seemed to be sending sometimes 2 or 3 copies of the email. What it turned out to be is that if you save your XSLT in the Umbraco XSLT editor, the save event triggers all XSLT exensions (which are being used) to be run. Hence saving the script results in the email being sent.
So if you save in the editor, preview the template which is calling the macro, then check your email, you'll get 2 of the same emails.
One to watch out for, and possibly the cause of the issue for @Profiterole.
This is an old thread, but I think it's a bug in Umbraco that is present in both 4.7.x and 6.0.3 where I've seen it.
It seems that if you insert the macro in the RTE on a page it gets called twice, BUT only rendered once. If you insert the same macro in the template, it's only called once. I think that could have a performance hit, if all RTE macros are called twice, if they are slow
sendMail send email twice
Hi, I have this line in my xslt :
It always send two copy of the email. Why?
Thank you
Hi Profiterole,
The code for SendMail only sends one email out... there might be something else going on in your template?
E.g. duplicate recipients in the "$ecardEmailTo"? or multiple calls to SendMail? (is the macro being included on your page twice?)
Cheers, Lee.
Thanks for your quick reply!
I change $ecardEmailTo for my email, so it can't be duplicate recipients. In my xslt, there's only one instance of sendmail and the macro is called only one on my textpage.
But it keeps to send email twice?
Hi
That's a strange one... haven't heard of this before. My feeling is that it might be a mail server / config issue? (but can't say with any certainy, sorry).
Taking a long-shot here... could you try changing the last parameter (IsHtml) to use a boolean (rather than a string)?
Cheers, Lee.
Ok, I'll look for at mail server. I tried to change to boolean. Nothing has change.
Thank for your help anyway!!
Like Lee says, this sounds very strange. Maybe you could show us your whole XSLT code for this file. There might be something else going on somewhere else in the file. I know it's a long shot, but just to be absolutely sure :)
/Kim A
Hmm, sounds like the "submit" event is somehow triggered twice..are you using some JavaScript to do this?
/Jan
Hi guys,
So the macro is inserted in a textpage and call xslt below. In Contour users fill a form (ecard.aspx), then they are redirected to ecard-post.aspx. On this page, there's a view of the ecard that is send to receiver.
Here's the xslt :
Hope you can see something!
@Jan : My goal is to be able to preview the ecard before the user send it. But for now, I'm just trying (discovering) things!
I know this is a really old thread, but just for the record... I thought I had this just now. The system seemed to be sending sometimes 2 or 3 copies of the email. What it turned out to be is that if you save your XSLT in the Umbraco XSLT editor, the save event triggers all XSLT exensions (which are being used) to be run. Hence saving the script results in the email being sent.
So if you save in the editor, preview the template which is calling the macro, then check your email, you'll get 2 of the same emails.
One to watch out for, and possibly the cause of the issue for @Profiterole.
This is an old thread, but I think it's a bug in Umbraco that is present in both 4.7.x and 6.0.3 where I've seen it.
It seems that if you insert the macro in the RTE on a page it gets called twice, BUT only rendered once. If you insert the same macro in the template, it's only called once. I think that could have a performance hit, if all RTE macros are called twice, if they are slow
I've reported the issue here: http://issues.umbraco.org/issue/U4-2139
/Bo
is working on a reply...