×

Discussion Board

Results 1 to 4 of 4

Thread: sending email

  1. #1
    Regular Contributor
    Join Date
    Jul 2009
    Posts
    101

    sending email

    I'm trying to send an email using the messaging module from a s60v5 phone

    >>> import messaging
    >>> messaging.mms_send(u'abc@xyz.com', u'hello', u'e:/file.txt')
    Traceback (most recent call last):
    File "<console>", line 1, in <module>
    File "c:\resource\python25\python25.zip\messaging.py", line 87, in mms_send
    _messaging.mms_send(unicode(number),unicode(msg),unicode(attachment))
    SymbianError: [Errno -28] KErrBadName

    I get the same error if I use a number rather than an email address in the first parameter.

    I checked with os.listdir that the file exists.

    There are a number of similar post about mms_send, but none seem to address this issue

    EDIT: I sent an email without an attachment, which went through. badname suggests there's something wrong with the filename of my attachment, which seems to be a problem I'm having.


    thanks
    Last edited by foosion; 2011-02-18 at 16:59.

  2. #2
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: sending email

    Write the path of the attachment DOS-style, i.e. with backslashes: u'e:\\file.txt'

  3. #3
    Regular Contributor
    Join Date
    Jul 2009
    Posts
    101

    Re: sending email

    That worked. Thank you.

    Would you know why you need to write e:\\file.txt? Every other place I can think of in Python, e:/file.txt works.

  4. #4
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: sending email

    I don't know. But if I had to guess, I'd say this is an issue that only affects the S60 specific modules. For example, in graphics.Image.open(path), path has to use backslashes. On the other hand, like you said, regular slashes work anywhere else in Python.

Similar Threads

  1. Sending EMail
    By vniles in forum Symbian Networking & Messaging (Closed)
    Replies: 3
    Last Post: 2008-01-14, 08:19
  2. Sending email
    By simrobe in forum Mobile Java Networking & Messaging & Security
    Replies: 6
    Last Post: 2006-08-18, 23:25
  3. sending email
    By Bill_Murray in forum Mobile Java General
    Replies: 8
    Last Post: 2005-09-26, 13:04
  4. sending email
    By Bill_Murray in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2005-09-14, 15:27
  5. Email sending
    By julie_777 in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2005-01-24, 10:21

Posting Permissions

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