Location: PHPKode > projects > Moc10 PHP Library > docs/api-docs/Moc10_Mail/Moc10_Mail.html
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html>
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class Moc10_Mail</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class Moc10_Mail</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
													<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
						|											<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Moc10_Mail</p>
	<ul class="tags">
				<li><span class="field">author:</span> Nick Sagona, III &lt;<a href="mailto:hide@address.com">hide@address.com</a>&gt;</li>
				<li><span class="field">version:</span> 1.9.7</li>
				<li><span class="field">copyright:</span> Copyright (c) 2009-2011 Moc 10 Media, LLC. (http://www.moc10media.com)</li>
				<li><span class="field">license:</span> <a href="http://www.moc10phplibrary.com/LICENSE.TXT">New BSD License</a></li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_Mail.php.html">/Mail.php</a> (line <span class="field">33</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>



	<a name="sec-var-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Variable Summary</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
							| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<div class="var-summary">
																																																																																																<div class="var-title">
					<span class="var-type">array</span>
					<a href="#$_attachments" title="details" class="var-name">$_attachments</a>
				</div>
																<div class="var-title">
					<span class="var-type">string</span>
					<a href="#$_charset" title="details" class="var-name">$_charset</a>
				</div>
																<div class="var-title">
					<span class="var-type">string</span>
					<a href="#$_headers" title="details" class="var-name">$_headers</a>
				</div>
																<div class="var-title">
					<span class="var-type">string</span>
					<a href="#$_html" title="details" class="var-name">$_html</a>
				</div>
																<div class="var-title">
					<span class="var-type"><a href="../Moc10_Language/Moc10_Language.html">Moc10_Language</a></span>
					<a href="#$_lang" title="details" class="var-name">$_lang</a>
				</div>
																<div class="var-title">
					<span class="var-type">string</span>
					<a href="#$_message" title="details" class="var-name">$_message</a>
				</div>
																<div class="var-title">
					<span class="var-type">string</span>
					<a href="#$_mime_boundary" title="details" class="var-name">$_mime_boundary</a>
				</div>
																<div class="var-title">
					<span class="var-type">array</span>
					<a href="#$_queue" title="details" class="var-name">$_queue</a>
				</div>
																<div class="var-title">
					<span class="var-type">string</span>
					<a href="#$_subject" title="details" class="var-name">$_subject</a>
				</div>
																<div class="var-title">
					<span class="var-type">string</span>
					<a href="#$_text" title="details" class="var-name">$_text</a>
				</div>
											</div>
		</div>
	</div>

	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																		<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
				 
				|
						<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																																																																																														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#__construct" title="details" class="method-name">__construct</a>
											(<span class="var-type">string|array</span>&nbsp;<span class="var-name">$em</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$nm</span> = <span class="var-default">null</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$subj</span> = <span class="var-default">null</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#attachFile" title="details" class="method-name">attachFile</a>
											(<span class="var-type">string|<a href="../Moc10_File/Moc10_File.html">Moc10_File</a></span>&nbsp;<span class="var-name">$file</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#getBoundary" title="details" class="method-name">getBoundary</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#getCharset" title="details" class="method-name">getCharset</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#getSubject" title="details" class="method-name">getSubject</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#init" title="details" class="method-name">init</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#send" title="details" class="method-name">send</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#setBoundary" title="details" class="method-name">setBoundary</a>
											([<span class="var-type">string</span>&nbsp;<span class="var-name">$bnd</span> = <span class="var-default">null</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#setCharset" title="details" class="method-name">setCharset</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$chr</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#setHeaders" title="details" class="method-name">setHeaders</a>
											([<span class="var-type">string|array</span>&nbsp;<span class="var-name">$hdrs</span> = <span class="var-default">null</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#setHtml" title="details" class="method-name">setHtml</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$html</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#setSubject" title="details" class="method-name">setSubject</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$subj</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#setText" title="details" class="method-name">setText</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$txt</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#_getMessageType" title="details" class="method-name">_getMessageType</a>
										()
									</div>
											</div>
		</div>
	</div>		

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Variables</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
						
			
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			
<a name="var$_attachments" id="$_attachments"><!-- --></a>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">array</span>
			<span class="var-name">$_attachments</span>
			 = <span class="var-default">array()</span>			(line <span class="line-number">88</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">File attachments</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$_charset" id="$_charset"><!-- --></a>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">string</span>
			<span class="var-name">$_charset</span>
			 = <span class="var-default"> 'utf-8'</span>			(line <span class="line-number">76</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Character set</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$_headers" id="$_headers"><!-- --></a>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">string</span>
			<span class="var-name">$_headers</span>
			 = <span class="var-default"> null</span>			(line <span class="line-number">70</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Headers</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$_html" id="$_html"><!-- --></a>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">string</span>
			<span class="var-name">$_html</span>
			 = <span class="var-default"> null</span>			(line <span class="line-number">64</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">HTML part of the message body</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$_lang" id="$_lang"><!-- --></a>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type"><a href="../Moc10_Language/Moc10_Language.html">Moc10_Language</a></span>
			<span class="var-name">$_lang</span>
			 = <span class="var-default"> null</span>			(line <span class="line-number">94</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Language object</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$_message" id="$_message"><!-- --></a>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">string</span>
			<span class="var-name">$_message</span>
			 = <span class="var-default"> null</span>			(line <span class="line-number">52</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Message body</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$_mime_boundary" id="$_mime_boundary"><!-- --></a>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">string</span>
			<span class="var-name">$_mime_boundary</span>
			 = <span class="var-default"> null</span>			(line <span class="line-number">82</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">MIME boundary</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$_queue" id="$_queue"><!-- --></a>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">array</span>
			<span class="var-name">$_queue</span>
			 = <span class="var-default">array()</span>			(line <span class="line-number">40</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Sending queue</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$_subject" id="$_subject"><!-- --></a>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">string</span>
			<span class="var-name">$_subject</span>
			 = <span class="var-default"> null</span>			(line <span class="line-number">46</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Subject</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$_text" id="$_text"><!-- --></a>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">string</span>
			<span class="var-name">$_text</span>
			 = <span class="var-default"> null</span>			(line <span class="line-number">58</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Text part of the message body</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
						
		</div>
	</div>
	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
																	<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<a name='method_detail'></a>
<a name="method__construct" id="__construct"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">Constructor __construct</span> (line <span class="line-number">107</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Constructor</p>
<p class="description">Instantiate the mail object.</p>
	<ul class="tags">
				<li><span class="field">throws:</span> Exception</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			__construct
		</span>
					(<span class="var-type">string|array</span>&nbsp;<span class="var-name">$em</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$nm</span> = <span class="var-default">null</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$subj</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string|array</span>
				<span class="var-name">$em</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$nm</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$subj</span>			</li>
				</ul>
		
			
	</div>
<a name="methodattachFile" id="attachFile"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">attachFile</span> (line <span class="line-number">249</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Attach a file to the mail object.</p>
	<ul class="tags">
				<li><span class="field">throws:</span> Exception</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			attachFile
		</span>
					(<span class="var-type">string|<a href="../Moc10_File/Moc10_File.html">Moc10_File</a></span>&nbsp;<span class="var-name">$file</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string|<a href="../Moc10_File/Moc10_File.html">Moc10_File</a></span>
				<span class="var-name">$file</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetBoundary" id="getBoundary"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getBoundary</span> (line <span class="line-number">184</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Get MIME boundary</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			getBoundary
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetCharset" id="getCharset"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getCharset</span> (line <span class="line-number">209</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Get character set</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			getCharset
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetSubject" id="getSubject"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getSubject</span> (line <span class="line-number">159</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Get the subject</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			getSubject
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodinit" id="init"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">init</span> (line <span class="line-number">294</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Initialize the email message.</p>
	<ul class="tags">
				<li><span class="field">throws:</span> Exception</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			init
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodsend" id="send"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">send</span> (line <span class="line-number">370</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Send mail message or messages.</p>
<p class="description">This method depends on the server being set up correctly as an SMTP server  and sendmail being correctly defined in the php.ini file.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			send
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodsetBoundary" id="setBoundary"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">setBoundary</span> (line <span class="line-number">172</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Set MIME boundary</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setBoundary
		</span>
					([<span class="var-type">string</span>&nbsp;<span class="var-name">$bnd</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$bnd</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsetCharset" id="setCharset"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">setCharset</span> (line <span class="line-number">197</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Set character set</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setCharset
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$chr</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$chr</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsetHeaders" id="setHeaders"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">setHeaders</span> (line <span class="line-number">273</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Set headers</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setHeaders
		</span>
					([<span class="var-type">string|array</span>&nbsp;<span class="var-name">$hdrs</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string|array</span>
				<span class="var-name">$hdrs</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsetHtml" id="setHtml"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">setHtml</span> (line <span class="line-number">235</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Set HTML part of the message.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setHtml
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$html</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$html</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsetSubject" id="setSubject"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">setSubject</span> (line <span class="line-number">147</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Set the subject</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setSubject
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$subj</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$subj</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsetText" id="setText"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">setText</span> (line <span class="line-number">222</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Set text part of the message.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setText
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$txt</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$txt</span>			</li>
				</ul>
		
			
	</div>
<a name="method_getMessageType" id="_getMessageType"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">_getMessageType</span> (line <span class="line-number">400</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Get message type.</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			_getMessageType
		</span>
				()
			</div>
	
		
			
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Wed, 12 Jan 2011 01:17:44 -0600 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
	</p>
	</div></body>
</html>
Return current item: Moc10 PHP Library