Welcome Guest, Not a member yet? Register   Sign In
CI Moblog?
#1

[eluser]stuffradio[/eluser]
I've been suffering the whole summer trying to get this piece of code to work.

I had searched Google about a million times for a solution, and found nothing that fully worked. I am able to download attachments from normal emails correctly... but when it comes to MMS messages, it always downloads as a 'xxx.alternative' file.

Now, I went back to the imap_pop class to try and use it... it displayed nothing. I added in my code "echo $msg_count".

I set $msg_count to fetch the number of emails in the inbox, it's set to 1 but the first time I viewed it with that piece of code it displayed an image that was with the MMS message. It wasn't the message I sent, but it's from the same email which is a HUGE step in the right direction!

Can someone please help me finish this off? I'll send you a beer if you can!

Code:
<?php

class Email extends Controller
{

  function Email()
  {
    parent::Controller();

  }
  
  function index()
  {    
    $this->load->library('imap_pop');
// settings for gmail, you must have
// SSL support compiled into PHP
// and turn on POP in gmail
$config['server']='pop.gmail.com:995';
$config['login']='[email protected]';
$config['pass']='xxx';
$config['service_flags'] = '/pop3/ssl/novalidate-cert';
$config['mailbox']='INBOX';
$msg_count = $this->imap_pop->connect_and_count($config);
$em = $this->imap_pop->grab_email_as_array(1);
$this->imap_pop->close();
print_r($em);
echo $msg_count;
  }

}
#2

[eluser]stuffradio[/eluser]
This is what shows up when I load the page with that code.

Code:
Array ( [strings] => Array ( [header] => Delivered-To: [email protected] Received: by 10.142.48.2 with SMTP id v2cs83175wfv; Wed, 3 Sep 2008 23:35:27 -0700 (PDT) Received: by 10.143.33.19 with SMTP id l19mr3403451wfj.112.1220510127052; Wed, 03 Sep 2008 23:35:27 -0700 (PDT) Return-Path: <[email protected]> Received: from smtp01.prv.sun2.lightsurf.net (smtp01.sun2.lightsurf.net [64.157.6.50]) by mx.google.com with ESMTP id 30si15472388wfg.9.2008.09.03.23.35.26; Wed, 03 Sep 2008 23:35:27 -0700 (PDT) Received-SPF: neutral (google.com: 64.157.6.50 is neither permitted nor denied by best guess record for domain of [email protected]) client-ip=64.157.6.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 64.157.6.50 is neither permitted nor denied by best guess record for domain of [email protected]) [email protected] Received: from rogers-back002 (smtp.prv.sun2.lightsurf.net [10.103.1.134]) by smtp01.prv.sun2.lightsurf.net (8.12.11.20060308/8.12.10) with ESMTP id m846Tt4j020705 for ; Wed, 3 Sep 2008 23:35:09 -0700 Date: Wed, 3 Sep 2008 23:35:09 -0700 Message-ID: <19338225.1220510113642.JavaMail.lsadm@rogers-back002> From: [email protected] To: [email protected] Subject: You've received a Picture Message from your friend whose Fido number is x. MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_119134_1849868.1220510113641" [message_id] => <19338225.1220510113642.JavaMail.lsadm@rogers-back002> [subject] => You've received a Picture Message from your friend whose Fido number is x. [date_string] => Wed, 3 Sep 2008 23:35:09 -0700 [date_sent_stamp] => 2008-09-03 23:35:09 [date_received_stamp] => 2008-09-03 23:39:37 [size] => 49875 [text] => You have received a picture or video message from x. Click below to view now (charges apply) or visit http://picturemessaging.fido.ca via PC. [html] =>
    

You've received a picture message from your friend whose Fido number is x

View Picture Message
    

Use your Fido to take and send picture

More

Share your happiest and most crazy moments instently

More
View Picture Messaging Demo         Tell me more about Picture Messaging         Check out cool camera phones
[temp_msg_id] => 1 [email_fingerprint_auto] => 4391d37740a71ea2ecbc516e43977883 ) [arrays] => Array ( [from] => Array ( [0] => Array ( [mailbox] => x [host] => fido.ca ) ) [to] => Array ( [0] => Array ( [mailbox] => owner [host] => phonebroadcasting.com ) ) [reply_to] => Array ( [0] => Array ( [mailbox] => x [host] => fido.ca ) ) [sender] => Array ( [0] => Array ( [mailbox] => x [host] => fido.ca ) ) ) ) 1

Note: I replaced my phone number with "x". So wherever you see "x" that's what it is.

Does anyone see where the image that I sent is possibly?
#3

[eluser]mglinski[/eluser]
Problem: You are not sending a true MMS message. When you receive a message like the above it means the cell phone provider has saved the image to their servers and is just sending you a link so you can view it. It never actually sends you the image you think you are sending.

I could be very wrong, but I have investigated this before. Lookup wither your phone can actually send MMS messages and wither your cell plan can send MMS.
-Matt
#4

[eluser]stuffradio[/eluser]
Well if you have a cell phone plan where it doesn't cost you anything extra, and have a cell phone that sends MMS... can you help me to test this?
#5

[eluser]mglinski[/eluser]
I wish i could help but I have a smartphone on Sprint in the USA, and they do not allow MMS from smartphones for some weird reason. Can someone else help him out?
-Matt
#6

[eluser]stuffradio[/eluser]
No one can help? Do you know how I can send an MMS using an alternative gateway than what is provided by my phone provider?
#7

[eluser]stuffradio[/eluser]
I got it to work sorta with that store and save function... but it only works with certain phones.

Is there a way to make it with every phone!?




Theme © iAndrew 2016 - Forum software by © MyBB