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

Sending E-mail to Multiple Recipients

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

  • Sending E-mail to Multiple Recipients

    I'm sure this has to be easy, but I can't seem to get this to work.

    I have a table where most, but not all, have an an e-mail address. They also have a "Area" field (1 - 4) based on location.

    I want to send an e-mail to everyone in areas 1 & 2. I used the expression builder to build =(isnotblank(E_Mail).AND.Area="1".OR.Area=2) but it comes back "invalid or incomplete expression." I'm not sure what I did wrong or if this is will even do what I want.

    I would appreciate some help. TIA
    "There comes a point in every project where it becomes necessary to shoot the engineers and begin production."

  • #2
    Re: Sending E-mail to Multiple Recipients

    Code:
    =(isnotblank([COLOR=Red]"[/COLOR]E_Mail[COLOR=Red]"[/COLOR]).AND.[COLOR=Red]([/COLOR]Area="1".OR.Area=2[COLOR=Red])[/COLOR])
    Try the changes in red above (note the 2 additional parens).

    Ray

    Comment


    • #3
      Re: Sending E-mail to Multiple Recipients

      Code:
      =(isnotblank("E_Mail").AND.(Area="1".OR.Area="2"))
      or (depending on the data type of the area field)

      Code:
      =(isnotblank("E_Mail").AND.(Area=1.OR.Area=2))
      There can be only one.

      Comment


      • #4
        Re: Sending E-mail to Multiple Recipients

        Thanks for the prompt replys.

        I did the following:
        Pasted the following into the expression builder:

        =(isnotblank("E_Mail").AND.(Area="1".OR.Area="2"))

        (All the fields are character fields.)

        It gave me a valid "ok" and as I paged thru a few records and it registered "true" and "false" as it should have. This expression went into the BCC line.

        I filled in the rest of the e-mail and tried to send it. I got an error message ("Error sending message 550 Invalid Recipient <.F.>") Clicked on the OK and ended up with ".F. " in the BCC field.

        I tried to replicate the e-mail, but no matter which of the 3 expressions I use that you guys guys gave me I am back to the same "invalid or incomplete expression."

        I even tried to create an operation to extract the email field and copy it to a new table, with the same result..."invalid or incomplete expression."

        I'm baffled that the expression worked once but never again. I even closed A5, reopened it and tried it all again with the same results.
        Last edited by Juror58; 02-21-2009, 02:53 AM.
        "There comes a point in every project where it becomes necessary to shoot the engineers and begin production."

        Comment


        • #5
          Re: Sending E-mail to Multiple Recipients

          At the very least I would have to know how/where you are trying to send the email (A5 email client, Outlook, etc.), what email function you are using, are you creating comma or crlf() delimited list of recipients or, oh I see, you said the expression went into the "BCC line". In that case you may have to use a5_eval_expression() to make it work. Also, have you tried using Action Scripting to build the basics of what you want, including the expression using a5_eval_expression()? You could then convert the AS to xbasic and do much more. But no matter what, I would need much more detail to help any further. Better yet, a sample application with instructions on how you are doing things. The expression we gave you should be good to go, so probably there is some other problem.

          Ray

          Comment


          • #6
            Re: Sending E-mail to Multiple Recipients

            Wow! Another night owl. Thanks for helping me slog thru this, Ray.

            I am using the A5 e-mail client. I thought it would be easier than trying to export the 87 addresses and import them into my regular e-mail client (PocoMail). It is a pretty good client, except the address book Is a pita to import into.

            I was under the impression from the (scant) description in the help files using the expression would do what I wanted. It seems there is a steeper learning curve than I thought.

            Up until now my needs from A5 have been modest and didn't need action scripting. Sounds like something I need to get into now.

            >>>
            In that case you may have to use a5_eval_expression() to make it work...
            <<<

            Do you mean: a5_eval_expression(=(isnotblank("E_Mail").AND.(Area="1".OR.Area="2"))) in the BCC field?

            This whole thing is for a chorale group my wife sings in and I was volunteered to maintain the database. This table is a list of area churches (about 140) to whom we send an announcement of an upcoming event, asking them to put it in their bulletin/newsletter. I only send the announcement to the churches in the general area of the concert location (which changes, depending on which venue we can use).

            The table has fields for church name, address, phone, fax, e-mail, area, and notes.

            To do this in PocoMail I would have to have four mailing lists, one for each area, and send it out two or more times. No, not hard, but I figured this would be easier once I set it up in A5, especially when we make changes to the table, which I am sure we will after the mailing. This is the first attempt at this so I am sure there will be quite a few changes.

            As I said, it looks like setting it up will be a bit more of a challenge than I thought. Oh well, the snow will keep me indoors this weekend anyways.
            Last edited by Juror58; 02-21-2009, 04:19 AM.
            "There comes a point in every project where it becomes necessary to shoot the engineers and begin production."

            Comment


            • #7
              Re: Sending E-mail to Multiple Recipients

              Hi all,
              From what I can see is that Terry is trying to use a filter in the BCC field (.T. or .F.) when it actually is looking for an email address.

              So may use something along the lines of...???

              Code:
              if(isnotblank("E_Mail").AND.(Area="1".OR.Area="2"), "Whatever_Email_Address","")
              Mike
              __________________________________________
              It is only when we forget all our learning that we begin to know.
              It's not what you look at that matters, it's what you see.
              Henry David Thoreau
              __________________________________________



              Comment


              • #8
                Re: Sending E-mail to Multiple Recipients

                Terry,

                Mike is clearly correct. Also, in the "BCC line" I'm pretty sure what you need is either one email address or a comma or possibly a crlf() delimited list of address. I don't quite see how putting your expression in the BCC line is going to produce such a list. Seems to me you would have to create that list before you ever get to filling in the email parameters. If the list is very long I also wonder if it would even work. Seems like I read somewhere on this forum that long lists cause problems, but I am not sure about that.

                Ray

                Comment


                • #9
                  Re: Sending E-mail to Multiple Recipients

                  >>>
                  Seems to me you would have to create that list before you ever get to filling in the email parameters.
                  <<<

                  Seems that would defeat the purpose of the database. The reason I used the database in the first place was to avoid having information in multiple locations (database/spreadsheet file, e-mail address book, etc.) and having to build a separate mailing list in the e-mail client for each area. The help implies this is possible:

                  "Enter an address into the To field. Optionally, enter an expression that defines the content of this field. If you opened the email client from a form or browse, you may click the to display the Expression Builder to help you define an expression. Separate multiple addressees with a comma or semicolon."

                  This implies you can do something you clearly cannot. The expression will only work if you want to send one e-mail to one person? (or three at most).

                  Why is this so hard? I am clearly not the only one who has the need to send an e-mail to a database mailing list. Do I have to spend $200 on Netmailer to do what I want to do, or will that not do it either?
                  "There comes a point in every project where it becomes necessary to shoot the engineers and begin production."

                  Comment


                  • #10
                    Re: Sending E-mail to Multiple Recipients

                    Terry, maybe it would help if you uploaded a small sample along with an explanation of how you're going about this.

                    I for one am confused about whether you're trying to stuff multiple email addresses into a single email so that a single email message can be sent to multiple email addresses... OR... and this is very different... whether you are trying to query the table for only those folks who meet your specific criteria, so that you can then write a script that steps through the filtered subset of your records to send a separate email message to the recipient identified in each record. So, which is is? single email to multiple recipients, or multiple emails sent to one recipient at a time?

                    -- tom

                    Comment


                    • #11
                      Re: Sending E-mail to Multiple Recipients

                      Terry,
                      I do believe Ray is correct regarding a limit on characters in the field but unsure--if there is it most likely is a 1024 limit, but this can be worked around I believe.

                      This should do as you want though as have just tested it on a small scale.

                      Create a global variable say called lst

                      On a button that is to send the email(s) add prior to any scripts an Action Script to set the created variable lst to a constant which would be similar to the following, but using your table name that has the E_Mail field instead of the "Your_Table_Name" I used...

                      Code:
                      crlf_to_comma(table.external_record_content_get("Your_Table_Name","alltrim(E_Mail)","","isnotblank(\"E_Mail\").AND.(Area=\"1\".OR.Area=\"2\")"))
                      Now in your action script that brings up your email, set the BCC to equal the variable lst.


                      EDIT: Tom's post definitely affects whether what I produced suits your situation. My example psudo-code would be for having one email sent with many BCC addresses that have been filtered.
                      Mike
                      __________________________________________
                      It is only when we forget all our learning that we begin to know.
                      It's not what you look at that matters, it's what you see.
                      Henry David Thoreau
                      __________________________________________



                      Comment


                      • #12
                        Re: Sending E-mail to Multiple Recipients

                        Originally posted by Juror58 View Post
                        >>>...
                        The help implies this is possible:

                        "Enter an address into the To field. Optionally, enter an expression that defines the content of this field. If you opened the email client from a form or browse, you may click the to display the Expression Builder to help you define an expression. Separate multiple addressees with a comma or semicolon."

                        This implies you can do something you clearly cannot. ...
                        First, I agree with Tom, a small sample app for us to look at would help.

                        Second, what the help says is correct. Say you are on a form. Any expression you put in the email parameters would only apply to the record you happen to be on--not your entire database. That's why you would first have to do something like what Mike suggested, which is not exactly a big deal. In your script you would simply do something like that before the email part of it. But as already stated, I am not sure how many addresses (total characters) you can have in your list or whether using a variable will get around whatever the limit might be (which I doubt).

                        Ray

                        Comment


                        • #13
                          Re: Sending E-mail to Multiple Recipients

                          Terry,
                          See if this helps. I had to go with what works for me:
                          Code:
                          dim vfilter as C
                          dim vA1 as C = "1"
                          dim vA2 as C = "2"
                          dim vem as C = ""
                          	
                          vfilter = "area = "+ quote(vA1) + " .or. area = "+quote(vA2) + " .and. e_mail <> "+quote(vem)
                          this works too.

                          Code:
                          dim vfilter as C
                          vfilter = "isnotblank(\"E_Mail\").AND.(Area=\"1\".OR.Area=\"2\")"
                          ?a5_get_records_in_query("contacts",vfilter)
                          = 3
                          I attached an example. I forgot I am currently behind a wireless firewall that doesn't allow an email client to be used, so I can't test this, but I believe it should work.

                          The form buttom runs a user defined function named email_one_by_one(). It collects the email parameters and message from an xdialog and uses these values as variables to populate the email client. It could easily be written to run all emails without stopping for user review prior to send, if that is what you want. I wasn't sure.

                          Let us know if you need more help.
                          Last edited by Mike Wilson; 02-21-2009, 04:04 PM.
                          Mike W
                          __________________________
                          "I rebel in at least small things to express to the world that I have not completely surrendered"

                          Comment


                          • #14
                            Re: Sending E-mail to Multiple Recipients

                            >>>
                            I for one am confused about whether you're trying to stuff multiple email addresses into a single email so that a single email message can be sent to multiple email addresses...
                            <<<

                            I am trying to send the same announcement to 87 churches.

                            The simplest workaround so far has been to create a report in A5 with the filtered e-mail addresses, save as a text file, open in WordPerfect, replace all the [HRT]'s with ";" and copy/paste into the BCC field in PocoMail. (Total time: about 10 minutes)

                            I appreciate all the help you guys have provided. It gives me a better insight as to the capabilities and limitations of the program. I incorrectly assumed A5 could do the same thing as described in my workaround without a lot of "programming," if it can do it at all. I don't mean that in a negative way. This may be one of the few limitations of the program.

                            While I have accomplished what I wanted to do for now, I will continue to play with this, as it now has become a challenge to me to get it to work.

                            Thanks again for all your insights and help.

                            Terry
                            "Why do they call it "Tourist Season" if you can't shoot them?"
                            "There comes a point in every project where it becomes necessary to shoot the engineers and begin production."

                            Comment


                            • #15
                              Re: Sending E-mail to Multiple Recipients

                              I hope the way you folks are trying to do this works.

                              I sent over 25000 emails out to selected potential customer last year and did it completely different(and probably wrong), but it worked. I had a script that was played from a from that sent an email then went to the next record and did it again. The form was filtered by a query to decide who got an email. If an arror occurred, the record was marked and the script went to the next record and sent another email. It kept doing this until eof.

                              It seems the 550 error was a bad email address as I remember it, but I could be wrong after a year.

                              If needed, I will try to find the small program.
                              Dave Mason
                              [email protected]
                              Skype is dave.mason46

                              Comment

                              Working...
                              X