Customize each mail sended since a distribution list

Use this forum if you have problems with a hMailServer script, such as hMailServer WebAdmin or code in an event handler.
Post Reply
JeromeBxl
New user
New user
Posts: 2
Joined: 2007-08-11 00:51

Customize each mail sended since a distribution list

Post by JeromeBxl » 2007-08-11 01:01

Hello,

I have a problem; I have configured a distribution list.
Now, when I send a message to the list, the mail is the same for all the subscribers.

I want to customize each message by adding the email address of the subscriber in a link in the body to give the possibility to do an unsubscribe online.

For that, I try to intercept each mail in the OnDeliverMessage event handler. I can only catch one mail in which the recipient collection contains the complete list of my subscribers, and not the individual recipient, as I need it.

I can’t intercept each mail individually to customize it.

Do you have any idea how this can be achieved?

Thanks in advance for your help,

Jérôme

^DooM^
Site Admin
Posts: 13861
Joined: 2005-07-29 16:18
Location: UK

Post by ^DooM^ » 2007-08-11 02:13

I am not sure about your specific request but there are mailing list scripts in the user contributed scripts section here.

http://www.hmailserver.com/forum/viewto ... ution+list

just do a search in that section if that script isn't what you are after.

JeromeBxl
New user
New user
Posts: 2
Joined: 2007-08-11 00:51

Post by JeromeBxl » 2007-08-11 18:47

Hello,

Thanks for your post. Unfortunatelly, this does not solve my problem. In the post you invited me to read, HMailServer reacts when he receives mails with commands as ‘subscribe, remove’.

This is not what I am looking for. I have a template of a newsletter that contains the following code:

<a href=unsubscribe.php?email=[EMAIL]>unsubscribe now</a>

And I want to replace the place holder [EMAIL] by the address email of the recipient.

The recipients are already subscribed.

Do you have any suggestions?

Thanks in advance,



Jérôme.

Thomas Parvais
Normal user
Normal user
Posts: 111
Joined: 2004-12-17 12:21
Contact:

Post by Thomas Parvais » 2007-08-21 14:36

nobody to help Jerome ?

User avatar
brother.gabriel
Normal user
Normal user
Posts: 139
Joined: 2012-03-29 17:25
Location: Kansas City
Contact:

Re: Customize each mail sended since a distribution list

Post by brother.gabriel » 2013-03-03 01:22

Ha ha! :lol: i'm about 9 years too late for this! However, I'll post a pseudo-solution in case anyone else comes here looking for answers.

First thing is to install the listserver script.

To do this, you need access to a webserver. Basically, you create a web page that has the ability to send an email. Then you insert the link to the webpage in your mailinglist_footer.html file. When the user clicks the link, the webpage is loaded and the user is told that they are unsubscribed.

You could insert a mailto link with the unscribe command in a hyperlink and put that in your footer.html file, but it will open in the user's email client rather than working automatically - but it works. All the user has to do is push send.

Code: Select all

<p style="color:gray size:8pt text-style:italic">You are subscribed to the mailing list: %address%.
<br />
<a href='mailto:%address%?subject=unsubscribe'>Click here to unsubscribe</a> (Just send the mail when it is composed).
</p>

Post Reply