Location: PHPKode > scripts > XS PHP Library > xs-php-library/doc/net/MailWriter.html
<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Frameset//EN''http://www.w3.org/TR/REC-html40/frameset.dtd'>
<!--NewPage-->
<HTML>
<HEAD>
	<!-- Generated by PhpDoc date: 'Mon, 11 Nov 2002 23:46:52 +0100' -->
	<TITLE>Docs For Class MailWriter</TITLE>
<LINK REL ='stylesheet' TYPE='text/css' HREF='stylesheet.css' TITLE='Style'>
</HEAD>
<BODY BGCOLOR='white'>

<!-- Start of Class Data -->
<H2>
	Class MailWriter
</H2>
<pre>
<pre><a href="../core/Object.html">Object</a>
   |
   --MailWriter</pre>
</pre>
<H3>
	Classes extended from MailWriter:
</H3>

<p>
	<b><i>Located in File: Program_Root/mailwriter.inc.php</i></b><br>
</p>
<hr>
<!-- ========== Info from phpDoc block ========= -->
<b>MailWriter class.</b>
<pre>
MailWriter class is a helper class which enables simple sending mail
 messages throught SMTP server. When the connection to the SMTP server will be
 opened multiple messages can be sent using the MailWriter::write() method.
</pre>
<UL>
	
	<LI><b>Package</b> - <CODE>net</CODE></LI>
	
	<LI><b>Version</b> - <CODE>$Id: MailWriter.html,v 1.2 2002/11/28 09:45:12 rbala Exp $</CODE></LI>
	
	<LI><b>Access</b> - <CODE>public</CODE></LI>
	
	<LI><b>Author</b> - <CODE>Robert Bala &lt;<a href="mailto:hide@address.com">hide@address.com</a>&gt;</CODE></LI>
	
</UL>

<hr>
<!-- =========== VAR SUMMARY =========== -->
<A NAME='var_summary'><!-- --></A>
<TABLE BORDER='1' CELLPADDING='3' CELLSPACING='0' WIDTH='100%'>
	<TR BGCOLOR='#CCCCFF' CLASS='TableHeadingColor'>
		<TD>
			<FONT SIZE='+2'><B>Class Variable Summary</B></FONT>
		</TD>
	</TR>

	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='MailWriter.html#$_auth'>$_auth</A></B></CODE>
			<BR>
			<blockquote> Indicates whether to use SMTP authentication or not. </blockquote>
			<blockquote> Default Value: <CODE>-><-</CODE> </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='MailWriter.html#$_host'>$_host</A></B></CODE>
			<BR>
			<blockquote> IP address or host name. </blockquote>
			<blockquote> Default Value: <CODE>-><-</CODE> </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='MailWriter.html#$_pass'>$_pass</A></B></CODE>
			<BR>
			<blockquote> The password used to login to POP3 server. </blockquote>
			<blockquote> Default Value: <CODE>-><-</CODE> </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='MailWriter.html#$_port'>$_port</A></B></CODE>
			<BR>
			<blockquote> TCP port number. </blockquote>
			<blockquote> Default Value: <CODE>-><-</CODE> </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='MailWriter.html#$_smtp'>$_smtp</A></B></CODE>
			<BR>
			<blockquote> The SMTP access class. </blockquote>
			<blockquote> Default Value: <CODE>-><-</CODE> </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='MailWriter.html#$_user'>$_user</A></B></CODE>
			<BR>
			<blockquote> The username used to login to POP3 server. </blockquote>
			<blockquote> Default Value: <CODE>-><-</CODE> </blockquote>
		</TD>
	</TR>
	
</TABLE>

<hr>
<!-- =========== VAR SUMMARY =========== -->
<A NAME='var_summary'><!-- --></A>
<TABLE BORDER='1' CELLPADDING='3' CELLSPACING='0' WIDTH='100%'>
	<TR BGCOLOR='#CCCCFF' CLASS='TableHeadingColor'>
		<TD>
			<FONT SIZE='+2'><B>Inherited Class Variable Summary</B></FONT>
		</TD>
	</TR>

	
</TABLE>

<hr>
<!-- =========== INHERITED METHOD SUMMARY =========== -->
<A NAME='functions_inherited'><!-- --></A>
<TABLE BORDER='1' CELLPADDING='3' CELLSPACING='0' WIDTH='100%'>
	<TR BGCOLOR='#CCCCFF' CLASS='TableHeadingColor'>
		<TD>
			<FONT SIZE='+2'><B>Inherited Method Summary</B></FONT>
		</TD>
	</TR>

	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<FONT SIZE='+2'><B>Inherited From Class <a href="../core/Object.html">Object</a></B></FONT>
			<blockquote>
			<TABLE BORDER='1' CELLPADDING='3' CELLSPACING='0' WIDTH='95%'>
				<tr>
					<th>Function</th>
					<th>Description</th>
				</tr>
				
				<tr>
					<td><CODE><B><A HREF='../core/Object.html#constructor Object'>constructor Object (  )</A></B></CODE></td>
					<td>Object class constructor.</td>
				
				<tr>
					<td><CODE><B><A HREF='../core/Object.html#classMethods'>classMethods (  )</A></B></CODE></td>
					<td>Retrieves the class methods names of the object.</td>
				
				<tr>
					<td><CODE><B><A HREF='../core/Object.html#className'>className (  )</A></B></CODE></td>
					<td>Retrieves the name of the class of the object.</td>
				
				<tr>
					<td><CODE><B><A HREF='../core/Object.html#classParent'>classParent (  )</A></B></CODE></td>
					<td>Retrieves the parent class name for the object.</td>
				
				<tr>
					<td><CODE><B><A HREF='../core/Object.html#classProperties'>classProperties (  )</A></B></CODE></td>
					<td>Retrieves the class properties names of the object.</td>
				
				<tr>
					<td><CODE><B><A HREF='../core/Object.html#inheritsFrom'>inheritsFrom ( [$class = ] )</A></B></CODE></td>
					<td>Check if the objects inherits from the specified class.</td>
				
			</table>
			</blockquote>
		</TD>
	</TR>
	
</TABLE>

<br>
<!-- should have constructor at some point -->
<!-- =========== Method SUMMARY =========== -->
<A NAME='Method_summary'><!-- --></A>
<TABLE BORDER='1' CELLPADDING='3' CELLSPACING='0' WIDTH='100%'>
	<TR BGCOLOR='#CCCCFF' CLASS='TableHeadingColor'>
		<TD>
			<FONT SIZE='+2'><B>Method Summary</B></FONT>
		</TD>
	</TR>

	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='MailWriter.html#constructor MailWriter'>void constructor MailWriter ( $host, [$auth = false], [$user = ''], [$pass = ''], [$port = ''25''] )</A></B></CODE>
			<BR>
			<blockquote> MailWriter class constructor. </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='MailWriter.html#close'>mixed close (  )</A></B></CODE>
			<BR>
			<blockquote> Attempt to close connection from the SMTP server. </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='MailWriter.html#isOpened'>boolean isOpened (  )</A></B></CODE>
			<BR>
			<blockquote> Finds whether the socket connection is opened. </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='MailWriter.html#open'>mixed open (  )</A></B></CODE>
			<BR>
			<blockquote> Attempt to open connection to the SMTP server. </blockquote>
		</TD>
	</TR>
	
	<!-- =========== Summary =========== -->
	<TR BGCOLOR='white' CLASS='TableRowColor'>
		<TD>
			<CODE><B><A HREF='MailWriter.html#write'>mixed write ( &$mail )</A></B></CODE>
			<BR>
			<blockquote> Attempt to send mail message throught the SMTP server. </blockquote>
		</TD>
	</TR>
	
</TABLE>

<hbr>
<!-- ============ VARIABLE DETAIL =========== -->

<A NAME='variable_detail'></A>
<TABLE BORDER='1' CELLPADDING='3' CELLSPACING='0' WIDTH='100%'>
	<TR BGCOLOR='#CCCCFF' CLASS='TableHeadingColor'>
		<TD>
			<FONT SIZE='+2'><B>Variable Detail</B></FONT>
		</TD>
	</TR>
</TABLE>


<A NAME='$_auth'><!-- --></A><H3>$_auth</H3>
<b>Data type:</b> boolean<br>
<!-- ========== Info from phpDoc block ========= -->
<b>Indicates whether to use SMTP authentication or not.</b>
<pre>

</pre>
<UL>
	
	<LI><b>Access</b> - <CODE>private</CODE></LI>
	
</UL>

<HR>

<A NAME='$_host'><!-- --></A><H3>$_host</H3>
<b>Data type:</b> string<br>
<!-- ========== Info from phpDoc block ========= -->
<b>IP address or host name.</b>
<pre>

</pre>
<UL>
	
	<LI><b>Access</b> - <CODE>private</CODE></LI>
	
</UL>

<HR>

<A NAME='$_pass'><!-- --></A><H3>$_pass</H3>
<b>Data type:</b> string<br>
<!-- ========== Info from phpDoc block ========= -->
<b>The password used to login to POP3 server.</b>
<pre>

</pre>
<UL>
	
	<LI><b>Access</b> - <CODE>private</CODE></LI>
	
</UL>

<HR>

<A NAME='$_port'><!-- --></A><H3>$_port</H3>
<b>Data type:</b> int<br>
<!-- ========== Info from phpDoc block ========= -->
<b>TCP port number.</b>
<pre>

</pre>
<UL>
	
	<LI><b>Access</b> - <CODE>private</CODE></LI>
	
</UL>

<HR>

<A NAME='$_smtp'><!-- --></A><H3>$_smtp</H3>
<b>Data type:</b> object<br>
<!-- ========== Info from phpDoc block ========= -->
<b>The SMTP access class.</b>
<pre>

</pre>
<UL>
	
	<LI><b>Access</b> - <CODE>private</CODE></LI>
	
</UL>

<HR>

<A NAME='$_user'><!-- --></A><H3>$_user</H3>
<b>Data type:</b> string<br>
<!-- ========== Info from phpDoc block ========= -->
<b>The username used to login to POP3 server.</b>
<pre>

</pre>
<UL>
	
	<LI><b>Access</b> - <CODE>private</CODE></LI>
	
</UL>

<HR>


<hr>
<!-- ============ FUNCTION DETAIL =========== -->

<A NAME='function_detail'></A>
<TABLE BORDER='1' CELLPADDING='3' CELLSPACING='0' WIDTH='100%'>
	<TR BGCOLOR='#CCCCFF' CLASS='TableHeadingColor'>
		<TD>
			<FONT SIZE='+2'><B>Method Detail</B></FONT>
		</TD>
	</TR>
</TABLE>


<A NAME='constructor MailWriter'><!-- --></A><H3>constructor MailWriter</H3>
<P><B>void constructor MailWriter ( $host, [$auth = false], [$user = ''], [$pass = ''], [$port = ''25''] )</B></P>
<P></P>
<!-- ========== Info from phpDoc block ========= -->
<b>MailWriter class constructor.</b>
<pre>
Creates the new instance of MailWriter class and sets up basic properties.
</pre>
<DL>
	<DT>Function Parameters:</DT>
	
	<DD><CODE>- <i>string $host</i>: IP address or host name.</CODE></DD>
	
	<DD><CODE>- <i>boolean $auth</i>: indicates whether to use SMTP authentication or not, defaults to false.</CODE></DD>
	
	<DD><CODE>- <i>string $user</i>: the username to login, defaults to "".</CODE></DD>
	
	<DD><CODE>- <i>string $pass</i>: the password to login, defaults to "".</CODE></DD>
	
	<DD><CODE>- <i>int $port</i>: TCP port number, defaults to 25.</CODE></DD>
	

	<DT>Function Info:</DT>
	
	<DD><b>Access</b> - <CODE>public</CODE></DD>
	
</DL>

<HR>

<A NAME='close'><!-- --></A><H3>close</H3>
<P><B>mixed close (  )</B></P>
<P></P>
<!-- ========== Info from phpDoc block ========= -->
<b>Attempt to close connection from the SMTP server.</b>
<pre>
If called when the connection is not established, it returns error
 object otherwise it returns true on success or a error object with an
 error message on any kind of failure.
</pre>
<DL>
	<DT>Function Parameters:</DT>
	

	<DT>Function Info:</DT>
	
	<DD><b>Access</b> - <CODE>public</CODE></DD>
	
</DL>

<HR>

<A NAME='isOpened'><!-- --></A><H3>isOpened</H3>
<P><B>boolean isOpened (  )</B></P>
<P></P>
<!-- ========== Info from phpDoc block ========= -->
<b>Finds whether the socket connection is opened.</b>
<pre>
Returns true if the connection is established, false otherwise.
</pre>
<DL>
	<DT>Function Parameters:</DT>
	

	<DT>Function Info:</DT>
	
	<DD><b>Access</b> - <CODE>public</CODE></DD>
	
</DL>

<HR>

<A NAME='open'><!-- --></A><H3>open</H3>
<P><B>mixed open (  )</B></P>
<P></P>
<!-- ========== Info from phpDoc block ========= -->
<b>Attempt to open connection to the SMTP server.</b>
<pre>
If called when the connection is already established, it returns error
 object otherwise it returns true on success or a error object with an
 error message on any kind of failure.
</pre>
<DL>
	<DT>Function Parameters:</DT>
	

	<DT>Function Info:</DT>
	
	<DD><b>Access</b> - <CODE>public</CODE></DD>
	
</DL>

<HR>

<A NAME='write'><!-- --></A><H3>write</H3>
<P><B>mixed write ( &$mail )</B></P>
<P></P>
<!-- ========== Info from phpDoc block ========= -->
<b>Attempt to send mail message throught the SMTP server.</b>
<pre>
Returns true on success or a error object with an error message on any
 kind of failure.
</pre>
<DL>
	<DT>Function Parameters:</DT>
	
	<DD><CODE>- <i>object $mail</i>: the valid <a href="../net/Mail.html">Mail</a> object.</CODE></DD>
	

	<DT>Function Info:</DT>
	
	<DD><b>Access</b> - <CODE>public</CODE></DD>
	
</DL>

<HR>


<hr>
</HTML>
Return current item: XS PHP Library