Trying to utilize mailx to send mail via apython script

Discussion in 'Linux Networking' started by Ferrous Cranus, Sep 5, 2013.

  1. Ferrous Cranus

    Whiskers Guest

    Might be useful to clarify whether the OP wants the visitor's message to
    be sent *to* the OP's Gmail address, eg as feedback from a website, or
    wants the visitor to be able to send emails to anyone by *relaying*
    through Google's SMTP server using the OP's Google account but with
    unspecified or invented 'From' addresses.

    The latter should not be permitted by Google or any other email service
    provider, of course.

    Whiskers, Sep 10, 2013
    1. Advertisements

  2. Στις 10/9/2013 6:38 μμ, ο/η Whiskers έγÏαψε:
    What i want is for my weboage to notify me for the visitors spcified
    mail address and message and this be done by setting up my won mail
    server because gmail's tend to alter the from address.
    Ferrous Cranus, Sep 10, 2013
    1. Advertisements

  3. Ferrous Cranus

    David Brown Guest

    Your own email server will either send via another "real" SMTP server,
    such as gmail's (which will change the Sender and/or From fields), or it
    will try to deliver email directly - in which case half the receiving
    email servers will block it as a spam server (even if you go to all the
    effort of fixed IP's, proper DNS, and proper reverse DNS, you will be
    caught sending with From addresses that should not be coming from your

    I don't know why this is so difficult for you to comprehend - you cannot
    forge other people's From addresses and expect everything to work!

    Just implement the web site in the same way everybody else does - fields
    that the user enters (such as their own address) go as part of the email
    contents, and the whole thing is emailed to a fixed address from a fixed
    address (these can even be the same, such as your gmail address).

    This is not rocket science - people have been doing it correctly for a
    long time. The reason you are having such a hard time is because you
    are desperately trying to misunderstand how email works, and how web
    email forms work.


    (These use php rather than python, but the principle is the same.)
    David Brown, Sep 10, 2013
  4. Ferrous Cranus

    Whiskers Guest

    Your web page cannot send an email 'From:' the visitor's email address.
    It has to send emails 'From' an address which you own and using an SMTP
    server associated with that email address.

    If you want to know the visitor's email address, design the form to
    include that as part of the 'body' of the email message the web page
    sends to you (or perhaps as the 'Reply-To:' header of that message).


    Checking whether or not the visitor has given a real email address, is a
    separate matter.
    Whiskers, Sep 10, 2013
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.