×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Apr 2007
    Posts
    6

    Could not Send email through RSendAs!

    Hi Staff,
    I got this code from http://wiki.forum.nokia.com/index.ph...s_with_RSendAs.
    I modified as fellowing:
    void CPrinterDriverAppUi::SendEmail(const TDesC& Receiver, const TDesC& Subject, const TDesC& body)
    {
    RSendAs send;
    User::LeaveIfError(send.Connect());
    CleanupClosePushL(send);

    RSendAsMessage sendAsMessage;
    sendAsMessage.CreateL(send, KUidMsgTypeSMTP);
    CleanupClosePushL(sendAsMessage);

    sendAsMessage.SetSubjectL(Subject);
    sendAsMessage.AddRecipientL(
    Receiver,RSendAsMessage::ESendAsRecipientTo);
    //adding to field
    sendAsMessage.SetBodyTextL(body);

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

    sendAsMessage.SendMessageAndCloseL();
    CleanupStack::Pop();
    CleanupStack::PopAndDestroy();
    }
    I compiled this and run on my phone E62. but it could not send email. Please help me to solve this problem.

    Thanks in advanced!

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

    Re: Could not Send email through RSendAs!

    Quote Originally Posted by tanzhongguo View Post
    ...
    I compiled this and run on my phone E62. but it could not send email. Please help me to solve this problem.

    Thanks in advanced!
    What problem did you face while sending email? Was there any error? Please describe more about your problem so that somebody may reply you.

    Kiran.
    Nokia Developer Wiki Moderation team

  3. #3
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: Could not Send email through RSendAs!

    My guess is c:\\data\\splash.bmp does not exist
    Download Symbian OS now! [url]http://developer.symbian.org[/url]

  4. #4
    Nokia Developer Champion
    Join Date
    Jan 2008
    Location
    Bangalore, India
    Posts
    777

    Re: Could not Send email through RSendAs!

    as todd said "c:\\data\\splash.bmp does not exist " u can check ur bmp and put ur bmp into c:\data\others\spalsh.bmp
    and try this _L("c:\\data\\othrers\\splash.bmp")
    instead of (_L("c:\\data\\splash.bmp") this...

  5. #5
    Registered User
    Join Date
    Apr 2007
    Posts
    6

    Re: Could not Send email through RSendAs!

    Thanks for all of you.
    When I debug on emulator, It was stop at here:
    sendAsMessage.CreateL(send, KUidMsgTypeSMTP);

    Then When Chnage to this:
    sendAsMessage.create(send, KSenduiMtmSmtpUid);

    I can compile it, but when I build phone release version, Carbide show me a lot of errors. I am working on S60 3rd MR SDK.

    I researched a lot of web sites. now I am confused by them. because I check function RSendAsMessage::CreateL, its parameter are:
    (1) RSendAsMessage sendAsMessage
    (2) TUid aMessageType
    but in S60 3rd MR SDK, I could not find Message type for SMTP as KUidMsgTypeSMTP.

    I hope anyone can tell me how to send email in Symbian C++ clearly, the best is who can gives me working example code.

    Thanks in advanced!

  6. #6
    Registered User
    Join Date
    Jun 2012
    Posts
    1

    Re: Could not Send email through RSendAs!

    Hii,
    For the same code i am getting System error(-1) while running the application on emulator.. What is this problem? Plz help me.
    thanks

  7. #7
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,572

    Re: Could not Send email through RSendAs!


Similar Threads

  1. RSendAs panics on cleanup (after sending email with attachment)
    By kenley in forum Symbian Networking & Messaging (Closed)
    Replies: 3
    Last Post: 2010-03-25, 10:57
  2. Send email from J2ME devices
    By crystal13 in forum Mobile Java Networking & Messaging & Security
    Replies: 13
    Last Post: 2009-07-29, 07:40
  3. 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
  4. 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
  •