Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

This Dastardly Email From Issue

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    This Dastardly Email From Issue

    Hi,

    I am trying to send an email using email_send2() and the .From header component to specify the sender's email for easy replies. No matter what I do the email always uses the email address from my profile I have setup as the From email address, even if I don't specify the profile in the function.

    dim message as p
    dim vResult as l
    message.from="[email protected]"
    message.to="[email protected]"
    message.subject = "Test"
    message.message = "Test"
    vResult=email_send2(message,"",.F.,.F.,.F.)

    When I run the above the from address is always "[email protected]" which is the email address in my profile. I want the from to be something I am pulling from my form but even when I specify a different value directly, as above, it does not use that as the From. Does anyone know why this might be the case?

    Thanks,
    Carl
    Last edited by carlg; 06-07-2014, 02:43 PM. Reason: Clarification

    #2
    Re: This Dastardly Email From Issue

    Looks pretty good Carl. Couple things to try:

    1. Try adding an alias and see if that helps:
    message.from_alias = "Batman"

    2. Simplify your function call to just this:
    vResult = email_send2(message)

    I don't know that either will make a difference, but a comparison with some of mine suggests these experiments
    -Steve
    sigpic

    Comment


      #3
      Re: This Dastardly Email From Issue

      Your script looks correct. The function will use the Default email profile unless you specify a different one. But I confirmed (just now) that the function does work in including using the values for .from and .from_alias. It works for .from even if you do not specify a .from_alias.

      Not that it matters for the function, but I would not use "message" as the property array name, use something like "pm" instead.
      Steve Wood
      See my profile on IADN

      Comment


        #4
        Re: This Dastardly Email From Issue

        Steve,

        Thanks so much for the reply and your suggestions. I tried implementing both:

        dim message as p
        dim vResult as l
        message.from="[email protected]"
        message.from_alias = "Batman"
        message.to="[email protected]"
        message.subject = "Test"
        message.message = "Test"
        vResult=email_send2(message)

        The alias did come through as Batman but the email address still showed as "[email protected]":

        Batman <[email protected]>

        I went into the WAS Email Settings for my one email profile, which is setup for [email protected]. I am using gmail for the POP and SMTP in this profile. I first tried changing the Your Name and Your Email Address fields (in the Account tab) to the from information I'm trying to implement. That didn't help as the email still came through as from [email protected]. Then I updated the Username and Password fields in that same tab to the information for my personal gmail account, for which I'm testing the From field. When I did that, the email did come through with the from email set to [email protected]. The Alias still did work as well as it said "Batman".

        So despite the fact that I am not using the profile in the email_send2 function, the profile is clearly being used anyway and it is ignoring the .From header component that I set and using the profile's information instead. Any ideas? My understanding from the documentation is that the email_send2 function uses built-in Alpha email features. Perhaps I have something configured in the profile wrong so that Alpha always uses it for the email_send2 function? Is there any way to setup a profile that doesn't automatically use your username as the From email address?

        Thanks,
        Carl

        Comment


          #5
          Re: This Dastardly Email From Issue

          So despite the fact that I am not using the profile in the email_send2 function, the profile is clearly being used
          email send2 uses the profile, it is optional to mention which one to use, if you did not mention then it uses the last used profile.
          the script looks good it should have your name as alias.
          if you want no profile then you have to send with no profile option
          email_send_noprofile()
          Last edited by GGandhi; 06-07-2014, 05:46 PM.
          thanks for reading

          gandhi

          version 11 3381 - 4096
          mysql backend
          http://www.alphawebprogramming.blogspot.com
          [email protected]
          Skype:[email protected]
          1 914 924 5171

          Comment


            #6
            Re: This Dastardly Email From Issue

            Originally posted by Steve Wood View Post
            The function will use the Default email profile unless you specify a different one.
            OK Steve, so I have to setup a different email profile for this? How do I setup an email profile so that it uses the .From value in the email_send2() function?

            Thanks so much for your help!

            Carl

            Comment


              #7
              Re: This Dastardly Email From Issue

              Carl,

              We recently ran into a similar issue and found the culprit to be Gmail.

              Ours always worked fine and we were having issues with our domains email server where some of our emails weren't being sent properly. We temporarily changed the SMTP settings to our Gmail account until our hosting company got the problem resolved.

              As long as we were using Gmails SMTP server to send the emails, the from address would not pull from the logged in user.

              We came to the conclusion that Gmail blocks this behavior.

              I suspect if you use the SMTP server for obitium.com it will work correctly.

              Hope this helps...

              Tim
              Last edited by Tim Sutherland; 06-07-2014, 05:04 PM.

              Comment


                #8
                Re: This Dastardly Email From Issue

                I bet the difference is you are using gmail as your email processor. I can try that here....

                EDIT: Opps, cross post with Tim
                Steve Wood
                See my profile on IADN

                Comment


                  #9
                  Re: This Dastardly Email From Issue

                  We have a Google Apps for Business account with users that we use for other purposes so I was hopeful to use it as our mail server for our web app through Alpha. I just spoke with support at Google Enterprise and they explained that in order to do this what Alpha Software would need to do is allow me to modify the "Return Path" as opposed to the "From" value of the email. As an example, here is an excerpt of the original email that was sent through the Alpha using the code I referenced in my above posts for this thread:

                  Return-Path: <[email protected]>
                  From: Batman <[email protected]>
                  X-Google-Original-From: Batman <[email protected]>
                  To: <[email protected]>
                  Subject: Test
                  Date: Sat, 07 Jun 2014 17:29:34 -0400
                  MIME-Version: 1.0
                  X-Mailer: Alpha Five Version 12.0 Build 1755-4215
                  Content-Type: text/plain;
                  charset="us-ascii"
                  Content-Transfer-Encoding: 7bit

                  Test

                  You can see that my code has set the X-Google-Original-From: Batman <[email protected]> correctly to [email protected] but not the From value just above it, which apparently Google does block from being modified. But the value for Return-Path: <[email protected]> remains [email protected] and this is all I would need to change. If I could set this value in the email_send2() function then when we receive the email from the contact form we can simply reply to it and it will be sent to the email address the user provides, which is what I'm after. In looking at the documentation for email_send2() I do see:

                  .Headers
                  Optional. Default = "". If the user wants to supply additional Email headers per RFC822, they can set them in the Headers property.

                  Would this be something I could use to set the "Return-Path"? Does anyone know the correct syntax for this? Or if I am on the wrong track here?

                  Comment


                    #10
                    Re: This Dastardly Email From Issue

                    I think there is a p.Msg.reply-to = or maybe p.Msg.reply_to= (not documented anywhere I can find)

                    You can use that to return to a different address.
                    Pat Bremkamp
                    MindKicks Consulting

                    Comment


                      #11
                      Re: This Dastardly Email From Issue

                      Originally posted by Pat Bremkamp View Post
                      I think there is a p.Msg.reply-to = or maybe p.Msg.reply_to= (not documented anywhere I can find)

                      You can use that to return to a different address.

                      Has anyone found a definitive answer to the original post in this thread? I have been brothered by this same issue for years. It would really be appreciated if you could advance some working solutions to this problem.

                      Comment

                      Working...
                      X