vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   using Vb mail on non vb script (https://vborg.vbsupport.ru/showthread.php?t=195035)

Thug 10-30-2008 07:44 PM

using Vb mail on non vb script
 
wondering if its possibile to use the Vbulletin mailing system in a 3rd party script? if so how could i do this :).
thanx

cono1717 10-31-2008 03:54 PM

Yeah this is easy,

Go to http://yourforumurl.com.sendmessage.php

Then view the source of the page.

You should have something that looks like this.
HTML Code:

<form action="[COLOR="Red"]/*ADD YOUR FORUM PATH HERE*\[/COLOR]/sendmessage.php?do=docontactus" method="post">
<input type="hidden" name="s" value="" />
<input type="hidden" name="securitytoken" value="guest" />
<input type="hidden" name="do" value="docontactus" />
<input type="hidden" name="url" value="index.php" />

You need to copy and paste all the way to
HTML Code:

        <div style="margin-top:6px">
                <input type="submit" class="button" value="Send" accesskey="s" />
                <input type="reset" class="button" name="reset" value="Reset Fields" accesskey="r" />
        </div>
        </td>
</tr>

</table>

</form>

Also make sure you go to your forum ACP and turn on reCAPTCHA, trust me it makes things easier. Once this is done you have the basics of your form. However it looks a little boring so you can add your own CSS or use the vBulletin one by doing the following.

Open the contact page you just made in a text editor and copy and paste the following.

Code:

<!-- CSS Stylesheet -->
<style type="text/css" id="vbulletin_css">
/**
* vBulletin  CSS
* Style: 'Default Style'; Style ID: 1
*/
body
{
        background: #E1E1E2;
        color: #000000;
        font: 10pt verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
        margin: 5px 10px 10px 10px;
        padding: 0px;
}
a:link, body_alink
{
        color: #22229C;
}
a:visited, body_avisited
{
        color: #22229C;
}
a:hover, a:active, body_ahover
{
        color: #FF4400;
}
.page
{
        background: #FFFFFF;
        color: #000000;
}
td, th, p, li
{
        font: 10pt verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
}
.tborder
{
        background: #D1D1E1;
        color: #000000;
        border: 1px solid #0B198C;
}
.tcat
{
        background: #869BBF url(YOUR FORUM PATH/images/gradients/gradient_tcat.gif) repeat-x top left;
        color: #FFFFFF;
        font: bold 10pt verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
}
.tcat a:link, .tcat_alink
{
        color: #ffffff;
        text-decoration: none;
}
.tcat a:visited, .tcat_avisited
{
        color: #ffffff;
        text-decoration: none;
}
.tcat a:hover, .tcat a:active, .tcat_ahover
{
        color: #FFFF66;
        text-decoration: underline;
}
.thead
{
        background: #5C7099 url(YOUR FORUM PATH/images/gradients/gradient_thead.gif) repeat-x top left;
        color: #FFFFFF;
        font: bold 11px tahoma, verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
}
.thead a:link, .thead_alink
{
        color: #FFFFFF;
}
.thead a:visited, .thead_avisited
{
        color: #FFFFFF;
}
.thead a:hover, .thead a:active, .thead_ahover
{
        color: #FFFF00;
}
.tfoot
{
        background: #3E5C92;
        color: #E0E0F6;
}
.tfoot a:link, .tfoot_alink
{
        color: #E0E0F6;
}
.tfoot a:visited, .tfoot_avisited
{
        color: #E0E0F6;
}
.tfoot a:hover, .tfoot a:active, .tfoot_ahover
{
        color: #FFFF66;
}
.alt1, .alt1Active
{
        background: #F5F5FF;
        color: #000000;
}
.alt2, .alt2Active
{
        background: #E1E4F2;
        color: #000000;
}
.inlinemod
{
        background: #FFFFCC;
        color: #000000;
}
.wysiwyg
{
        background: #F5F5FF;
        color: #000000;
        font: 10pt verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
        margin: 5px 10px 10px 10px;
        padding: 0px;
}
.wysiwyg a:link, .wysiwyg_alink
{
        color: #22229C;
}
.wysiwyg a:visited, .wysiwyg_avisited
{
        color: #22229C;
}
.wysiwyg a:hover, .wysiwyg a:active, .wysiwyg_ahover
{
        color: #FF4400;
}
textarea, .bginput
{
        font: 10pt verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
}
.bginput option, .bginput optgroup
{
        font-size: 10pt;
        font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
}
.button
{
        font: 11px verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
}
select
{
        font: 11px verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
}
option, optgroup
{
        font-size: 11px;
        font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
}
.smallfont
{
        font: 11px verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
}
.time
{
        color: #666686;
}
.navbar
{
        font: 11px verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
}
.highlight
{
        color: #FF0000;
        font-weight: bold;
}
.fjsel
{
        background: #3E5C92;
        color: #E0E0F6;
}
.fjdpth0
{
        background: #F7F7F7;
        color: #000000;
}
.panel
{
        background: #E4E7F5 url(YOUR FORUM PATH/images/gradients/gradient_panel.gif) repeat-x top left;
        color: #000000;
        padding: 10px;
        border: 2px outset;
}
.panelsurround
{
        background: #D1D4E0 url(YOUR FORUM PATH/images/gradients/gradient_panelsurround.gif) repeat-x top left;
        color: #000000;
}
legend
{
        color: #22229C;
        font: 11px tahoma, verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
}
.vbmenu_control
{
        background: #738FBF;
        color: #FFFFFF;
        font: bold 11px tahoma, verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
        padding: 3px 6px 3px 6px;
        white-space: nowrap;
}
.vbmenu_control a:link, .vbmenu_control_alink
{
        color: #FFFFFF;
        text-decoration: none;
}
.vbmenu_control a:visited, .vbmenu_control_avisited
{
        color: #FFFFFF;
        text-decoration: none;
}
.vbmenu_control a:hover, .vbmenu_control a:active, .vbmenu_control_ahover
{
        color: #FFFFFF;
        text-decoration: underline;
}
.vbmenu_popup
{
        background: #FFFFFF;
        color: #000000;

        border: 1px solid #0B198C;
}
.vbmenu_option
{
        background: #BBC7CE;
        color: #000000;
        font: 11px verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
        white-space: nowrap;
        cursor: pointer;
}
.vbmenu_option a:link, .vbmenu_option_alink
{
        color: #22229C;
        text-decoration: none;
}
.vbmenu_option a:visited, .vbmenu_option_avisited
{
        color: #22229C;
        text-decoration: none;
}
.vbmenu_option a:hover, .vbmenu_option a:active, .vbmenu_option_ahover
{
        color: #FFFFFF;
        text-decoration: none;
}
.vbmenu_hilite
{
        background: #8A949E;
        color: #FFFFFF;
        font: 11px verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
        white-space: nowrap;
        cursor: pointer;
}
.vbmenu_hilite a:link, .vbmenu_hilite_alink
{
        color: #FFFFFF;
        text-decoration: none;
}
.vbmenu_hilite a:visited, .vbmenu_hilite_avisited
{
        color: #FFFFFF;
        text-decoration: none;
}
.vbmenu_hilite a:hover, .vbmenu_hilite a:active, .vbmenu_hilite_ahover
{
        color: #FFFFFF;
        text-decoration: none;
}
/* ***** styling for 'big' usernames on postbit etc. ***** */
.bigusername { font-size: 14pt; }

/* ***** small padding on 'thead' elements ***** */
td.thead, th.thead, div.thead { padding: 4px; }

/* ***** basic styles for multi-page nav elements */
.pagenav a { text-decoration: none; }
.pagenav td { padding: 2px 4px 2px 4px; }

/* ***** de-emphasized text */
.shade, a.shade:link, a.shade:visited { color: #777777; text-decoration: none; }
a.shade:active, a.shade:hover { color: #FF4400; text-decoration: underline; }
.tcat .shade, .thead .shade, .tfoot .shade { color: #DDDDDD; }

/* ***** define margin and font-size for elements inside panels ***** */
.fieldset { margin-bottom: 6px; }
.fieldset, .fieldset td, .fieldset p, .fieldset li { font-size: 11px; }
</style>
<link rel="stylesheet" type="text/css" href="YOUR FORUM PATHclientscript/vbulletin_important.css?v=" />


<!-- / CSS Stylesheet -->

Replace all the " YOUR FORUM PATH " with your forum path.


Hope this helps,

Connor

Thug 10-31-2008 06:12 PM

ah thanx i think i need to explain myself a little..

i have a phpscript that sends emails...and iwant it to use the vbulletin mail system..(the system that vbulletin mass emails goes threw)

want to use it in my 3rd party script so that it doesnt send via the server but users vbulletsin smpt settings.

cono1717 11-01-2008 10:28 AM

Ah right sorry,

I will take a look at some of the settings but it may take me a while, maybe one of the more experienced coders will be able to help but if I find anything and no one else has posted I will post it ASAP,

Connor

Guest190829 11-03-2008 02:43 AM

vBulletin has its own function to handle mail:

Quote:

Starts the process of sending an email - either immediately or by adding it to the mail queue.
void vbmail (string $toemail, string $subject, string $message, [boolean $notsubscription = false], [string $from = ''], [string $uheaders = ''], [string $username = ''])
  • string $toemail: Destination email address
  • string $subject: Email message subject
  • string $message: Email message body
  • boolean $notsubscription: If true, do not use the mail queue and send immediately
  • string $from: Optional name/email to use in 'From' header
  • string $uheaders: Additional headers
  • string $username: Username of person sending the email



All times are GMT. The time now is 10:40 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01170 seconds
  • Memory Usage 1,757KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (2)bbcode_html_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete