[ZendTo] dropoff reminder uncorrect link (without zendToURL value)

Jules Jules at Zend.To
Wed Mar 8 17:00:40 GMT 2017


Riccardo,

I've just discovered that one too. :-(

The problem is that the first email is generated in response to a web 
action, so the web code can work out what the root url of the ZendTo 
server is from the HTTP parameters passed to it. I didn't want to have 
to hard-code the root url into a config file.

However, the reminders are sent via a cron job, which of course 
therefore doesn't know the root url of the ZendTo server as it can't 
work it out.

So as a short-term workaround, you can edit the dropoff_email.tpl 
template and hard-wire the start of the url.

What I'm looking into is possibly having the cron job do a "curl" of a 
URL so the reminders are generated by web-triggered code, which can 
therefore work out the root url.
But that's actually a waste of time, as for the curl to work, it's got 
to know the url to fetch, which will of course include the root url of 
the server anyway.

The other option is to maintain a file (updated when people access the 
web site) in /var/zendto that contains the calculated root url of the 
server. Then the cron job can just read that file.

Ideally that information would go in the DB, but that would involve a 
schema change. Schema changes are a pain for MySQL users, as they have 
to do it by hand because the web code won't have permission to add to 
the schema. With SQLite it's easy, I can just add to the schema dynamically.

Otherwise I'm going to have to force you to put the root url of the 
server into preferences.php or zendto.conf. :-(

Any preference for how I should do it?

Cheers,
Jules.


On 07/03/2017 08:23, tw2006 wrote:
> Hi all,
>   i'm on zendto latest release.
> When someone made a dropoff automatically start the email to the 
> receipents and all is ok, but when receipent receive a remainder about 
> dropoff the link in incorrect due it lost the zendto address.
>
> Example:
> 1st email
> [...]
> https://zendto.domain.tld/pickup.php?claimID=3bBSWzExxxxxxxx5&claimPasscode=HPhzHxxxxxxxxCc&emailAddr=email%40mail.com
> [...]
> reminder email:
> [...]
>  pickup.php?claimID=3bBSWzExxxxxxxx5&claimPasscode=HPhzHxxxxxxxxCc&emailAddr=email%40mail.com 
> <http://40mail.com>
> [...]
>
> Instead server url there is a space
>
> Hints?
> Bye
> Riccardo
>
>
> _______________________________________________
> ZendTo mailing list
> ZendTo at zend.to
> http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto

Jules

-- 
Julian Field MEng MBCS CITP CEng


www.Zend.To
Twitter: @JulesFM
PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/zendto/attachments/20170308/2544222e/attachment.html 


More information about the ZendTo mailing list