<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Email da cellulare]]></title><description><![CDATA[<p dir="auto">Ciao a tutti! Ho un email che quando mando posta col cellulare .. non fa inviare, come si può risolvere? e se da aggiungere qualcosa nel codice, grazie!</p>
<pre><code class="language-php">&lt;?php
if (isset($_POST["submit"])){
$a = $_POST['a'];
$da = $_POST['da'];
$obj = $_POST['obj'];
$testo = $_POST['testo'];
  $attachment = $_FILES['attachment']['tmp_name'];
  $attachment_type = $_FILES['attachment']['type'];
  $attachment_name = $_FILES['attachment']['name'];
  
$intestazioni = "From: " . $da;
  $messaggio = "";
if (is_uploaded_file($attachment))
  {
  $file = fopen($attachment,'rb');
  $data = fread($file, filesize($attachment));
  fclose($file);
  $data = chunk_split(base64_encode($data));
  $rand = md5(time());
  $boundary = "==Multipart_Boundary_x{$rand}x";
  
  $intestazioni .= "\nMIME-Version: 1.0\n";
  $intestazioni .= "Content-Type: multipart/mixed;\n";
  $intestazioni .= " boundary=\"{$boundary}\"";
  
  $messaggio .= "This is a multi-part message in MIME format.\n\n";
  $messaggio .= "--{$boundary}\n";
  $messaggio .= "Content-Type: text/plain; charset=\"iso-8859-1\"\n";
  $messaggio .= "Content-Transfer-Encoding: 7bit\n\n";
  $messaggio .= $testo . "\n\n";
  $messaggio .= "--{$boundary}\n";
  $messaggio .= "Content-Disposition: attachment;\n";
  $messaggio .= " filename=\"{$attachment_name}\"\n";
  $messaggio .= "Content-Transfer-Encoding: base64\n\n";
  $messaggio .= $data . "\n\n";
  $messaggio .= "--{$boundary}--\n";
  }
  else{
  $messaggio = $testo;
 }
if (mail($a, $obj, $messaggio, $intestazioni))
  {
  echo "Messaggio inviato con successo.";
  }else{
  echo "Si &amp;egrave; verificato un errore nell'invio.";
  }
 }else{
  ?&gt;
&lt;form action="&lt;? echo $_SERVER['PHP_SELF']; ?&gt;" 
  method="POST" enctype="multipart/form-data"&gt;
  Destinatario:
&lt;input type="text" name="a"&gt;&lt;br&gt;
  Mittente:
&lt;input type="text" name="da"&gt;&lt;br&gt;
  Oggetto:
&lt;input type="text" name="obj"&gt;&lt;br&gt;
  Messaggio:
&lt;textarea name="testo"&gt;&lt;/textarea&gt;&lt;br&gt;
  Allega file:
&lt;input type="file" name="attachment"&gt;&lt;br&gt;
&lt;input type="submit" name="submit" value="Invia" /&gt;&lt;br&gt;
© powered by UNIVERSAL 3000
&lt;/form&gt;&lt;?
  }
?&gt;
</code></pre>
<p dir="auto"><img src="https://dev.connect.gt/assets/plugins/nodebb-plugin-emoji/emoji/android/1f62e.png?v=3abbd2034aa" class="not-responsive emoji emoji-android emoji--open_mouth" style="height:1.4em;width:auto;vertical-align:middle" title=":o" alt="😮" /></p>
]]></description><link>https://dev.connect.gt/topic/74825/email-da-cellulare</link><generator>RSS for Node</generator><lastBuildDate>Thu, 03 Dec 2026 16:07:12 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/74825.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 15 Jun 2008 09:40:22 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Email da cellulare on Sun, 15 Jun 2008 14:56:10 GMT]]></title><description><![CDATA[<p dir="auto">Come il destinatario? O.o</p>
]]></description><link>https://dev.connect.gt/post/726402</link><guid isPermaLink="true">https://dev.connect.gt/post/726402</guid><dc:creator><![CDATA[thedarkita]]></dc:creator><pubDate>Sun, 15 Jun 2008 14:56:10 GMT</pubDate></item><item><title><![CDATA[Reply to Email da cellulare on Sun, 15 Jun 2008 12:29:02 GMT]]></title><description><![CDATA[<p dir="auto">con quello che dici da levare, si leva il destinatario, non mi fa mettere il link perchè non sono utente premium</p>
]]></description><link>https://dev.connect.gt/post/726405</link><guid isPermaLink="true">https://dev.connect.gt/post/726405</guid><dc:creator><![CDATA[leviathan73]]></dc:creator><pubDate>Sun, 15 Jun 2008 12:29:02 GMT</pubDate></item><item><title><![CDATA[Reply to Email da cellulare on Sun, 15 Jun 2008 11:55:41 GMT]]></title><description><![CDATA[<p dir="auto">intedevo di togleirlo con tutto il valore cioè tutto enctype="multipart/form-data" e provi, a volte ho visto che da qualche problema.</p>
<p dir="auto">Comunque l'upload dal cellulare come lo fai?</p>
]]></description><link>https://dev.connect.gt/post/726403</link><guid isPermaLink="true">https://dev.connect.gt/post/726403</guid><dc:creator><![CDATA[thedarkita]]></dc:creator><pubDate>Sun, 15 Jun 2008 11:55:41 GMT</pubDate></item><item><title><![CDATA[Reply to Email da cellulare on Sun, 15 Jun 2008 11:53:21 GMT]]></title><description><![CDATA[<p dir="auto">lo tolto. è diventato così</p>
<pre><code class="language-php">method="POST" ="multipart/form-data"&gt;
</code></pre>
<p dir="auto">ma non invia . Mi fa ritornare nella pagina iniziale dove si compilano i campi.</p>
]]></description><link>https://dev.connect.gt/post/726404</link><guid isPermaLink="true">https://dev.connect.gt/post/726404</guid><dc:creator><![CDATA[leviathan73]]></dc:creator><pubDate>Sun, 15 Jun 2008 11:53:21 GMT</pubDate></item><item><title><![CDATA[Reply to Email da cellulare on Sun, 15 Jun 2008 11:19:39 GMT]]></title><description><![CDATA[<p dir="auto">Non credo che dipenda da php... prova a togliere enctype magari il cellullare da problemi con quello... ma comunque non dipende dal php...</p>
]]></description><link>https://dev.connect.gt/post/726401</link><guid isPermaLink="true">https://dev.connect.gt/post/726401</guid><dc:creator><![CDATA[thedarkita]]></dc:creator><pubDate>Sun, 15 Jun 2008 11:19:39 GMT</pubDate></item></channel></rss>