Problems, need help? Have a tip or advice? Post it here.
4 posts Page 1 of 1
Hello guys,
I tried using
Code: Select all
<cms:if k_success>....</cms:if>
in the
Code: Select all
<cms:send_mail>
tag but it doesn't seem to work. Is there a way to check for a successfully sent email in couch cms? Thank you
@adimpressions,

tag but it doesn't seem to work. Is there a way to check for a successfully sent email in couch cms?


What do you exactly want to do is not clear to me, but I will try to answer a few things that you could probably try:

1. On localhost, you cannot send the email to any intended address unless configure a working email client from localhost. But that is a task to implement. So I wont suggest doing that nevertheless here is a resource.

2. You can do the following if you site is hosted on an online server.

2.1: You could probably send an email to your self and check it in your id if it has arrived.
2.2: You can use the debug attribute of the <cms:send_mail> tag.
Code: Select all
<cms:send_mail ..... debug='1' >...</cms:send_mail>

Then send an email. A log.txt will be created in the root folder of you site. You can view the log.txt file to see is the Delivery is successful.
2.3: Follow the steps here. (this are the steps out of CouchCMS perview, but I hope it can be helpful)

If you need more, to the point help, please share any code snippet which could help understand your problem better.

Regards,
GXCPL
Image
where innovation meets technology
I do not agree with the quote below. PHPMailer addon is included with Couch by default and can be configured to use GMail etc.

genxcoders wrote: 1. On localhost, you cannot send the email to any intended address unless configure a working email client from localhost.

@genx, I liked the idea to send a copy of email to self)

- - -

@adimpressions, Can you think about send_mail tag as a never failing code? It would be correct assumption. Code works fine (when correct) and without exceptions passes mail headers+body to the mail server. At this point Couch can not know if the recepient exists or the delivery went okay through intermediary relays.

[ Compare to Paypal, where PP makes a separate request to couch-based server with result of payment and we can catch that with paypal_processor tag. If mail server had a similar setup with a similar "ping-back", that would have made it possible to have k_success block (in the same asynchronously starting and running code as paypal_processor) ]

So, armed with the knowledge that couch code doesn't fail, you can devise a strategy to track successful delivery. However, delivery itself has little value.

Perhaps, status of reading of email is your ultimate goal to achieve? :) Often developers add a 'signal pixel' that is requested from your server when email is opened.

My Documentation, Addons, Functions.
Join COUCH telegram channel
I do not agree with the quote below. PHPMailer addon is included with Couch by default and can be configured to use GMail etc.

genxcoders wrote: 1. On localhost, you cannot send the email to any intended address unless configure a working email client from localhost.


@trendoman,

Since @adimpressions was working with <cms:send_mail> tag hence I quoted the above. If the purview was of PHP Mailer then also, a localhost server will not send the mail unless and until the the extension is activated. For security purposes the extension is not activated as it allows a ping back as you have discussed.

Nevertheless, I would still stand by my quote of Configuring an Email Client since technically speaking that will be a per-requsite

delivery itself has little value.
.
I would second to this since, delivery does has importance. May be it might not apply in this context, but it does. For example, If we are sending an email containing an invoice to someone, and the person denies receiving it, the delivery status serves as a proof. Also, in case of legal documents such as summons, delivery has a lot of importance, speaking in legal context.

But as a matter of fact writing a code to get a ping back, as you said, will not be useful, since it is already provided by the exchange server. So why re-invent the wheel!

a 'signal pixel'

This will be a great addon to the core functionality, if possible. Something like:
Code: Select all
<cms:send_mail from=... to=... subject='...' mail_read='1' />

where mail_read='1' could provide a return receipt and complete the 2-way handshake process. But the main point would be, that it should be automated without the receivers knowledge. Since, in the usual flow, a prompt is generated at the recipient end if a sender requests a read-receipt confirmation. Although, the prompt will not be a problem but without the prompt would be a good feature.

Regards,
GXCPL
Image
where innovation meets technology
4 posts Page 1 of 1