Erwin how can I do this so it sends a template? I am trying to relase a add on to your hack but I need your help. What I want to do is put the email message in a predefined template called invite
I removed all the "$" from all varables like vboptions[bbtitle] so users who are not logged on can get a idea of what this example is supposed to do.
So the name they enter i placed in the template and the template is sent.
the pics n what not I have done already. There is a new area called "optemailmessage" that I would like to also add.
attached is a fill out form I made please talk a look at the mild ajustments I made...
If you could help that would be really nice of you.
Code:
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head><title>$vboptions[bbtitle] - Refer $vboptions[bbtitle] to a Friend</title>
$headinclude
</head>
<body>
$header
$navbar
<form action="sendmessage.php" method="post">
<input type="hidden" name="s" value="$session[sessionhash]" />
<table cellpadding="$stylevar[outerborderwidth]" cellspacing="0" border="0" class="tborder" width="$stylevar[tablewidth]" align="center"><tr><td>
<table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
<tr>
<td class="thead" colspan="2"><b>Refer $vboptions[bbtitle] to a Friend</b></td>
</tr>
<!---$logincode--->
<tr>
<td class="alt2"><b>Send To (Person's Name):</b></td>
<td class="alt2"><input type="text" class="bginput" name="sendtoname" size="25" maxlength="75" /></td>
</tr>
<tr>
<td class="alt1"><b>Send To (Email Address):</b></td>
<td class="alt1"><input type="text" class="bginput" name="sendtoemail" size="25" maxlength="100" /></td>
</tr>
<tr>
<td class="alt2"><b>Subject:</b></td>
<td class="alt2"><input type="text" class="bginput" name="emailsubject" value="Join me at this website!" size="25" maxlength="100" /></td>
</tr>
<tr>
<td class="alt1" valign="top"><b>Optional<br>
Message:</b></td>
<td class="alt1"><textarea name="optemailmessage" rows="5" cols="50"></textarea><br>
<textarea name="emailmessage" rows="10" cols="50" readonly>Hey!
Your friend $bbuserinfo[username], is in the $vboptions[bbtitle] network and would like you to join them! Join and you will immediately be connected to the people who have invited you, and others in their networks!
$vboptions[bbtitle] is an online service that lets you meet new people, share photos, browse profiles, and chat online!
We'll see you inside,
</textarea></td>
</tr>
</table>
</td></tr></table>
<br />
<table cellpadding="2" cellspacing="0" border="0" width="$stylevar[tablewidth]" align="center">
<tr>
<td align="center">
<input type="submit" class="button" value="Send Email Now!" accesskey="s" />
<input type="hidden" name="t" value="$threadid" />
<input type="hidden" name="url" value="$vboptions[bburl]/referrals.php" />
<input type="hidden" name="refer" value="1" />
<input type="hidden" name="do" value="dosendtofriend" />
</td>
</tr>
</table>
<br>
<div align="center">
<p>or<br>
<a href="mailto:Enter%20Friend%27s%20Email?Subject=$bbuserinfo[username]%20has%20invited%20you%20to%20join%20$vboptions[bbtitle]!&Body=Join%20me%20at%20$vboptions[bbtitle]!%20%0D%0DJust%20click%20here%20to%20join:%20$vboptions[bburl]/forums/register%2Ephp%3Freferrerid%3D$bbuserinfo[userid]">Click here</a> to automatically place this link in your email!
</div>
</form>
$footer
</body>
</html>
quite sexy, the mod isn't a hard oen though, if i recall it's just a matter of changing $message to $template_name (assuming you've assigned the template to the variable properly). in the vbmail() tags