×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    May 2011
    Posts
    9

    send Email with Qt Mobility

    I write a sending Email program with Qt Mobility,but it doesn't work on N900 which is Maemo platforn. It suggest that Account ID is invalid.

    there are my key codes,please help me! Thank you!

    Code:
    void dialog2::SendEmail(){
    
    	QMessageService *messageService=new QMessageService;
    
    	// Create  a new email
    	QMessage msg;
    	msg.setType(QMessage::Email);
    	msg.setParentAccountId(QMessageAccount::defaultAccount(QMessage::Email));
    	// Add required parameters
    	msg.setTo (QMessageAddress(QMessageAddress::Email,"zhangbo1417@gmail.com"));
    	msg.setBody(EmailBody);
    	msg.setSubject("SMS Backup");
    
    	//Send email message
    	if(messageService->send(msg)){
    		QMessageBox::information(0,tr("Success"),tr("Email sent successfully!"));
    		hide();
    	}
    	else QMessageBox::warning(0,tr("Failed"),tr("Unable to send Email!"));
    }
    Last edited by divanov; 2011-05-16 at 12:38. Reason: adding CODE tag

  2. #2
    Regular Contributor
    Join Date
    Oct 2007
    Location
    India
    Posts
    349

    Re: send Email with Qt Mobility

    Additionally you can try QDestktopServices:penUrl(" mailto:abc@xyz.com.........")

  3. #3
    Registered User
    Join Date
    Nov 2009
    Posts
    3

    Re: send Email with Qt Mobility

    I was able to send mail on maemo without any problem. May be something is corrupt. Do you have a mail account setup in the device.
    May be you can check the returned Id (id.isValid()).

    I have faced problem with symbian, no matter where I setup a mail account in the device it never returns a valid mail account. I tried setting up in mail account in nokia messaging (most people use this application to check their mails). I tried setting up mail account in messages application, but no luck. Does anybody have any idea
    "How can we send email using mobility on symbian?"

Similar Threads

  1. Sending Email Using Qt Mobility
    By umakamat in forum [Archived] Qt Mobility Project
    Replies: 7
    Last Post: 2012-02-16, 07:51
  2. Send an email with Qt
    By AlterX in forum [Archived] Qt Mobility Project
    Replies: 11
    Last Post: 2011-05-16, 22:25
  3. Replies: 4
    Last Post: 2010-11-04, 20:40
  4. Video playback with Qt 4.7 and Qt Mobility 1.1.0 on Symbian^3
    By santama in forum [Archived] Qt Mobility Project
    Replies: 0
    Last Post: 2010-10-25, 14:05
  5. error installing qt-mobility with qt 4.7 on Windows 7
    By kaycee1 in forum [Archived] Qt SDKs and Tools
    Replies: 0
    Last Post: 2010-09-24, 02:18

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×