×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Sep 2009
    Location
    Punr
    Posts
    13

    How to send email

    Hi All,

    I have tried to send email, using following code. but it stucks on emulator.
    Is there any other way. Please reply.



    _LIT(KSmsClient, "Email Client");

    CSendAsMessageTypes* messageTypes = CSendAsMessageTypes::NewL();
    CleanupStack::PushL(messageTypes);

    // Filter all MTMs that can send messages.
    // This list can be refined by applying filters using FilterAgainstCapability.
    iSendAs.FilteredMessageTypesL(*messageTypes);

    TUid sendAsMtmUid;

    // Returning the message UID based on the message type
    // such as 0 for SMTP Client, 1 for SMS Client
    // 2 for Infrared client MTM and 3 for Bluetooth client MTM.
    sendAsMtmUid = messageTypes->UidFromNameL(KSmsClient);

    User::LeaveIfError(iSendAs.Connect());
    CleanupClosePushL(iSendAs);
    sendAsMtmUid = messageTypes->UidFromNameL(KSmsClient);
    //iSendAsMessage.CreateL(iSendAs, KSenduiMtmSmtpUid);
    //iSendAsMessage.CreateL(iSendAs, sendAsMtmUid);
    CleanupClosePushL(iSendAsMessage);

    iSendAsMessage.SetSubjectL(_L("Test Message"));
    iSendAsMessage.AddRecipientL(_L("bnpawar@gmail.com"),RSendAsMessage::ESendAsRecipientTo);
    //adding to field
    iSendAsMessage.SetBodyTextL(_L("This is my sample body text"));

    TRequestStatus status;
    //adding attachments
    //sendAsMessage.AddAttachment(_L("c:\\splash.bmp"),status);
    User::WaitForRequest(status);

    iSendAsMessage.SendMessageAndCloseL();
    CleanupStack::Pop();
    CleanupStack::PopAndDestroy();


    Regards,
    Bharat Pawar,
    Software Engineer

  2. #2
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,335

    Re: How to send email

    Check this article: http://wiki.forum.nokia.com/index.ph...s_with_RSendAs

    Did you try on real device? Make sure you have mailbox defined in your phone before using this code.
    Nokia Developer Wiki Moderation team

  3. #3
    Super Contributor
    Join Date
    May 2005
    Location
    Hyderabad,India
    Posts
    704

    Re: How to send email

    Hi,

    Check this link

    Thanks,
    Eswar

Similar Threads

  1. Could not Send email through RSendAs!
    By tanzhongguo in forum Symbian Networking & Messaging (Closed)
    Replies: 6
    Last Post: 2012-07-05, 08:14
  2. help... how to send email with SMTP
    By arie_8011 in forum Mobile Java Networking & Messaging & Security
    Replies: 2
    Last Post: 2009-05-09, 02:14
  3. How to send an image with attachment in email
    By krtrivdi in forum Symbian
    Replies: 1
    Last Post: 2007-01-09, 12:07
  4. nokia 7210 modem via IR doesn't work !
    By oussamaaiadi in forum PC Suite API and PC Connectivity SDK
    Replies: 1
    Last Post: 2003-03-06, 10:46
  5. Needs to send Ringtones and Logos via email
    By hiteshkaku in forum Smart Messaging
    Replies: 1
    Last Post: 2002-11-22, 06:30

Posting Permissions

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