<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ZoneArtCSS &#124; Desarrollo Web, Diseño de páginas Web, Aplicaciones Móviles, Notas de Tecnología &#187; Crear un buzón de correo con PHP</title>
	<atom:link href="http://www.zoneartcss.com/tag/crear-un-buzon-de-correo-con-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.zoneartcss.com</link>
	<description>Tips de Diseño y Desarrollo Web</description>
	<lastBuildDate>Wed, 26 Oct 2011 18:31:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Crear un buzón de correo con PHP imap_createmailbox()</title>
		<link>http://www.zoneartcss.com/webdevelopment/php/crear-un-buzon-de-correo-con-php-imap_createmailbox/</link>
		<comments>http://www.zoneartcss.com/webdevelopment/php/crear-un-buzon-de-correo-con-php-imap_createmailbox/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 22:48:17 +0000</pubDate>
		<dc:creator>miguelortega</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[bandeja de entrada]]></category>
		<category><![CDATA[buzon con php]]></category>
		<category><![CDATA[buzon de correo con php]]></category>
		<category><![CDATA[Crear un buzón de correo con PHP]]></category>
		<category><![CDATA[estado de mi correo]]></category>
		<category><![CDATA[imap_createmailbox()]]></category>
		<category><![CDATA[miguel ortega]]></category>

		<guid isPermaLink="false">http://www.zoneartcss.com/?p=1040</guid>
		<description><![CDATA[Crear un buzón de correo con PHP Es muy interesante poder hacer que nuestros usuarios de nuestro portal puedan crear su correo con el nombre de nuestro dominio sabemos que esto es posible con google o con msn, pero es mejor si podemos crear nuestro propio buzon de bandeja de entrada en php con las funciones imap, recuerde que esto lo debe tener habilitado su servidor. Este es un breve condigo de como verificar es [...]]]></description>
			<content:encoded><![CDATA[<div id=HOTWordsTxt name=HOTWordsTxt><p style="text-align: center;"><img class="aligncenter" src="http://zoneartcss.com/wp-content/php_imap.jpg" alt="crear un buzon con php" width="500" height="130" /></p>
<h4 style="text-align: center;"><span style="color: #ff9900;">Crear un buzón de correo con PHP</span></h4>
<p>Es muy interesante poder hacer que nuestros usuarios de nuestro portal puedan crear su correo con el nombre de nuestro dominio sabemos que esto es posible con google o con msn, pero es mejor si podemos crear nuestro propio buzon de bandeja de entrada en php con las funciones imap, recuerde que esto lo debe tener habilitado su servidor.<br />
<span id="more-1040"></span><br />
Este es un breve condigo de como verificar es estado de un correo de tu propio dominio.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000088;">$buzon</span> <span style="color: #339933;">=</span> <span style="color: #990000;">imap_open</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;{imap.example.org}&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;usuario&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;contraseña&quot;</span><span style="color: #339933;">,</span> OP_HALFOPEN<span style="color: #009900;">&#41;</span>
     or <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;no se pudo conectar: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #990000;">imap_last_error</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$nombre1</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;phpnuevobuzon&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$nombre2</span> <span style="color: #339933;">=</span> <span style="color: #990000;">imap_utf7_encode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;phpnuevobuzón&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$nuevo_nombre</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$nombre1</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;El nuevo nombre será '<span style="color: #006699; font-weight: bold;">$nombre1</span>'&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// ahora crearemos un nuevo buzón &quot;phpbuzonprueba&quot; en su carpeta de entrada,</span>
<span style="color: #666666; font-style: italic;">// chequearemos su status después de su creación y finalmente lo removeremos</span>
<span style="color: #666666; font-style: italic;">// para recuperar el estado inicial del buzón de entrada</span>
&nbsp;
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">@</span><span style="color: #990000;">imap_createmailbox</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$buzon</span><span style="color: #339933;">,</span> <span style="color: #990000;">imap_utf7_encode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;{imap.example.org}INBOX.<span style="color: #006699; font-weight: bold;">$nuevo_nombre</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$status</span> <span style="color: #339933;">=</span> <span style="color: #339933;">@</span><span style="color: #990000;">imap_status</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$buzon</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;{imap.example.org}INBOX.<span style="color: #006699; font-weight: bold;">$nuevo_nombre</span>&quot;</span><span style="color: #339933;">,</span> SA_ALL<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$status</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;su nuevo buzón '<span style="color: #006699; font-weight: bold;">$nombre1</span>' tiene el siguiente status:&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Mensajes:      &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$status</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">messages</span>    <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Recientes:     &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$status</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">recent</span>      <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;No leídos:     &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$status</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">unseen</span>      <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Siguiente UID: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$status</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">uidnext</span>     <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Validez UID:   &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$status</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">uidvalidity</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">imap_renamemailbox</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$buzon</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;{imap.example.org}INBOX.<span style="color: #006699; font-weight: bold;">$nuevo_nombre</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;{imap.example.org}INBOX.<span style="color: #006699; font-weight: bold;">$nombre2</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;se renombró el nuevo buzón de '<span style="color: #006699; font-weight: bold;">$nombre1</span>' a '<span style="color: #006699; font-weight: bold;">$nombre2</span>'&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$nuevo_nombre</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$nombre2</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;imap_renamemailbox en el nuevo buzón falló: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #990000;">imap_last_error</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;imap_status en el nuevo buzón falló: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #990000;">imap_last_error</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">@</span><span style="color: #990000;">imap_deletemailbox</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$buzon</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;{imap.example.org}INBOX.<span style="color: #006699; font-weight: bold;">$nuevo_nombre</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;el nuevo buzón fue eliminado para recuperar el estado inicial&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;imap_deletemailbox en el nuevo buzón falló: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #990000;">implode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #990000;">imap_errors</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;no se pudo crear un nuevo buzón: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #990000;">implode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #990000;">imap_errors</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #990000;">imap_close</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$buzon</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Espero que les funcione yo lo probé y si me funciono.</p>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.zoneartcss.com/webdevelopment/php/crear-un-buzon-de-correo-con-php-imap_createmailbox/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

