To illustrate this we will create a simple email template:
File email.wbsp
<!--
[FormFields]
WB_command=P
WB_mailserver=mail.whizbase.com
WB_from=admin@whizbase.com
WB_to=$wbv{email}
WB_mailauth=L
WB_mailuser=someuser
WB_mailpass=somepass
-->
<!--WB_BeginTemplate-->
<html>
<body>
<img src="http://www.whizbase.com/images/logo.jpg"><br>
Thank you for subscribing with us!<br>
</body>
</html>
[FormFields]
WB_command=P
WB_mailserver=mail.whizbase.com
WB_from=admin@whizbase.com
WB_to=$wbv{email}
WB_mailauth=L
WB_mailuser=someuser
WB_mailpass=somepass
-->
<!--WB_BeginTemplate-->
<html>
<body>
<img src="http://www.whizbase.com/images/logo.jpg"><br>
Thank you for subscribing with us!<br>
</body>
</html>
This WBSP code will send an email that will not show the logo image to the recipient automatically. Now we will do few modifications to embed the logo.jpg to our email:
File emailembed.wbsp
<!--
[FormFields]
WB_command=P
WB_mailserver=mail.whizbase.com
WB_from=admin@whizbase.com
WB_to=$wbv{email}
WB_mailauth=L
WB_mailuser=someuser
WB_mailpass=somepass
WB_embed=/images/logo.jpg
-->
<!--WB_BeginTemplate-->
<html>
<body>
<img src="$wbcid[/images/logo.jpg]"><br>
Thank you for subscribing with us!<br>
</body>
</html>
[FormFields]
WB_command=P
WB_mailserver=mail.whizbase.com
WB_from=admin@whizbase.com
WB_to=$wbv{email}
WB_mailauth=L
WB_mailuser=someuser
WB_mailpass=somepass
WB_embed=/images/logo.jpg
-->
<!--WB_BeginTemplate-->
<html>
<body>
<img src="$wbcid[/images/logo.jpg]"><br>
Thank you for subscribing with us!<br>
</body>
</html>
As you can see we just added a WB_embed variable to include the file /images/logo.jpg in the body of the email message (MIME encoded) and changed the reference to file logo.jpg to use embedded image using WB function $WBCID.
1 comment:
Thanks.
^_^
Post a Comment