i managed to include the mailing id in the url, so i should be able to get the mailing already, but not working still: ($mail seems is not getting the value, because when i access th page, im getting the $mail.getId() being printed out in the page)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<head>
<title>newsletter unsubscribe</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
<!--
body, table { font-family: Tahoma, Helvetica, sans-serif; font-size: 12px; }
h1 { font-family: Tahoma, Helvetica, sans-serif; font-size: 16px; }
select, input { font-family: Tahoma, Helvetica, sans-serif; font-size: 12px;}
select { width: 200px; }
-->
</style>
</head>
<body bgcolor="#C0C0C0" link="#bb2233" vlink="#bb2233" alink="#bb2233">
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr bgcolor="#808080">
<td bgcolor="#808080">
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td>
<form action="form.do">
<input type="hidden" name="agnCI" value="1">
<input type="hidden" name="agnFN" value="en_unsub_confirm">
<input type="hidden" name="agnUID" value="$!agnUID">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="3"> </td>
</tr>
<tr>
<td width="10"> </td>
#set ($mail=$MailingDao.getMailing(100, 1))
<td><h1><strong>
$mail.getId()</strong>UNSUBSCRIBE NEWSLETTER 1/2</h1>
<p>Do you really want to unsubscribe from our newsletter?</p>
<table border=0>
<tr><td width="120"><input type="submit" value=" Yes "></td>
<td><input type="reset" value=" No " onClick="javascript:history.back();"></td></tr>
</table>
</td>
<td width="10"> </td>
</tr>
<tr>
<td colspan="3"> </td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
maschoff wrote:You have to load the mailing object first with something like
Code: Select all
#set($mail=$MailingDao.getMailing(ID, 1)
But this would not help since you do not have the mailing ID (it is encoded in the UID, but there is no decode method available.