×

Discussion Board

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

    Issue with urllib on Nokia 6680, Python 1.4.3

    Hi.
    I have used this code:
    HTML Code:
    import urllib
    
    mail = 'mail_1@2mail.ru'
    sfrom = 'mail@mail.ru'
    text_to_send = 'test message for verification'
    subj = 'subj'
    
    link='http://waptrue.ws/tools/send2.php?method=post&to='+mail+'&from='+sfrom+'&msg='+text_to_send+'&sub='+subj
    try:
        t = urllib.urlopen(link)
        b = t.read()
        print('ok')
    except:
        print('not ok')
    but only "test" word was delivered in the message body. It seems, that all words and variables were ignored after first instance of the space symbol in the link. Is it a bug? How I can use URLLIB module in this situation?

  2. #2
    Nokia Developer Moderator
    Join Date
    May 2007
    Location
    21.46 N 72.11 E
    Posts
    3,800

    Re: Issue with urllib on Nokia 6680, Python 1.4.3

    Quote Originally Posted by Hyperfly View Post
    Hi.
    I have used this code:
    HTML Code:
    import urllib
    
    mail = 'mail_1@2mail.ru'
    sfrom = 'mail@mail.ru'
    text_to_send = 'test message for verification'
    subj = 'subj'
    
    link='http://waptrue.ws/tools/send2.php?method=post&to='+mail+'&from='+sfrom+'&msg='+text_to_send+'&sub='+subj
    try:
        t = urllib.urlopen(link)
        b = t.read()
        print('ok')
    except:
        print('not ok')
    but only "test" word was delivered in the message body. It seems, that all words and variables were ignored after first instance of the space symbol in the link. Is it a bug? How I can use URLLIB module in this situation?
    Hi Hyperfly and welcome to the Python Forum

    I tried the URL (PHP mailer) But It didn't seem to work for me.
    I don't know if it works for others.

    So I doubt the mailer (http://waptrue.ws/tools)

    Could you try a different one, if available !

    Best Regards,
    Croozeus
    Pankaj Nathani
    www.croozeus.com

  3. #3
    Regular Contributor
    Join Date
    Jan 2004
    Location
    Helsinki
    Posts
    376

    Smile Re: Issue with urllib on Nokia 6680, Python 1.4.3

    Quote Originally Posted by Hyperfly View Post
    Hi.
    but only "test" word was delivered in the message body. It seems, that all words and variables were ignored after first instance of the space symbol in the link. Is it a bug? How I can use URLLIB module in this situation?
    This is not PyS60 problem, but a generic Python and HTTP problem. Special characters must be encoded in URLs. Google python url encode.
    Mikko Ohtamaa

    http://mfabrik.com
    http://blog.mfabrik.com

Similar Threads

  1. Nokia Mobile VPN Client
    By marcyl in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2003-12-01, 14:47
  2. Series 60 Concept Emulator (SDK Beta 0.2 Linux) not working
    By mattbee in forum Mobile Java Tools & SDKs
    Replies: 1
    Last Post: 2003-06-10, 11:43

Posting Permissions

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