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

Emailing information help

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

    Emailing information help

    I am totally new in emailing 'things' in Alpha5 web app.
    Can someone tell me, show me how to send an email from a website when a person has updated a field, or send me to a page where I can read up on it?

    Man do I want to see a Action pack on this.

    Thanks

    #2
    Re: Emailing information help

    there's a ton of posts on the forum if you search for email, and really, once you set up your email profile (search no the forums or in the help), it's easy. I use email_send2(), which has xbasic like:

    Code:
    dim pm as p
    pm.to = "[email protected]"
    pm.to_alias = "john"
    pm.from = "[email protected]"
    pm.from_alias = "[email protected]"
    pm.subject = "important things"
    pm.message = "here's that file"
    pm.attachments = "important.doc"
    
    email_send2(pm)
    Any and all of the info in quotes above can be replaced with variables, whether from a dialog control, grid field, or otherwise.

    Comment


      #3
      Re: Emailing information help

      Thanks for showing me that, but how can I use that.
      Where do I put that in a button?
      How can I when a field changes that an email gets send
      Do I need to put that in the event settings, like the AfterUpdateRecords event?
      But I thought that the Events are Javascript and not xbasic?

      Thanks

      Comment


        #4
        Re: Emailing information help

        Roelof,
        You can do this from a grid component in events.
        I used the after insert event to send the values of fields in a grid component using emai_send()

        Dim msg as c
        msg=""+e.datasubmitted.First_Name+" "+e.datasubmitted.Last_Name+" We will see you "+e.datasubmitted.Scheduled_Date+" on "+e.datasubmitted.Scheduled_Time+""
        msg=msg
        email_send(e.datasubmitted.Email,"New Lead",msg,"","","",.F.,"","","")

        This fires when the new record is submitted.

        Bob
        Last edited by bob9145; 01-05-2011, 05:45 PM.

        Comment


          #5
          Re: Emailing information help

          Originally posted by christappan View Post
          there's a ton of posts on the forum if you search for email, and really, once you set up your email profile (search no the forums or in the help), it's easy. I use email_send2(), which has xbasic like:

          Code:
          dim pm as p
          pm.to = "[email protected]"
          pm.to_alias = "john"
          pm.from = "[email protected]"
          pm.from_alias = "[email protected]"
          pm.subject = "important things"
          pm.message = "here's that file"
          pm.attachments = "important.doc"
          
          email_send2(pm)
          Any and all of the info in quotes above can be replaced with variables, whether from a dialog control, grid field, or otherwise.
          So how do I make it so that I can add a field. For example I have a field that is called projectname.
          This is what I have but it does not work: pm.subject = "Added new project:"+ projectname

          Thanks

          Comment


            #6
            Re: Emailing information help

            What are you trying to send it from Dialog component, grid component?

            Comment


              #7
              Re: Emailing information help

              After a grid has been filled out, and the customer clicks on submit I want to send it.
              I have several fields like projectname, totalofmachines, date etc.

              This is what I have copied from above

              function AfterUpdateRecords as p

              dim pm as p
              pm.to = "[email protected]"
              pm.to_alias = "john"
              pm.from = "[email protected]"
              pm.from_alias = "[email protected]"
              pm.subject = "important things"
              pm.message = "here's that file"
              pm.attachments = "important.doc"
              debug(1)
              email_send2(pm)
              end function

              Of course I want to change the "" with fields information

              Thanks
              Roelof

              Comment


                #8
                Re: Emailing information help

                Dim to as c
                Dim subject as c
                Dim message as c

                to = e.datasubmitted.to
                subject = e.datasubmitted.subject
                message = e.datasubmitted.message

                email_send(to,subject,message,"","",.F.,"","","")


                Email send holds the corresponding parts of the email headers.
                Starting with to, then subject and then body ect...
                Look up the function in the help to find the position of the rest of the headers.

                Comment


                  #9
                  Re: Emailing information help

                  I still have an issue sending email out.

                  At the big M they use Exchange and mine POP and SMTP is not on. So how can I use email?

                  Comment


                    #10
                    Re: Emailing information help

                    I use the following code on event AfterInsertRecord and AfterUpdaterecord and it works. Try.


                    dim pm as P
                    dim ps as P
                    dim msubject as C

                    msubject=<<%html%
                    Something html that is your subject plus a data field {e.datasubmitted.yourdatafield}
                    %html%

                    html_msg = <<%html%
                    <html>
                    <head> </head>
                    <body>
                    <font face=Arial size=2>This is your message text which will go as html <br> This can be your some submitted data field {e.datasubmitted.SomeDataField}<font><br><br> </body>
                    </html>
                    %html%

                    if (email_smtp_open(ps, "your.domain.com", 25, "[email protected]", "smtpAuthPassword")) then
                    pm.to = "[email protected],[email protected],[email protected]"
                    pm.from = "[email protected]"
                    pm.subject = evaluate_string(msubject)
                    pm.message = ""
                    pm.attachments = ""
                    pm.html_message = evaluate_string(html_msg)

                    email_smtp_send(pm, ps)
                    end if
                    email_smtp_close(ps)


                    This does not require an email profile to be setup but fires email straight to the smtp server.

                    Cheers

                    Comment


                      #11
                      Re: Emailing information help

                      Originally posted by cjsingh View Post
                      I use the following code on event AfterInsertRecord and AfterUpdaterecord and it works. Try.


                      dim pm as P
                      dim ps as P
                      dim msubject as C

                      msubject=<<%html%
                      Something html that is your subject plus a data field {e.datasubmitted.yourdatafield}
                      %html%

                      html_msg = <<%html%
                      <html>
                      <head> </head>
                      <body>
                      <font face=Arial size=2>This is your message text which will go as html <br> This can be your some submitted data field {e.datasubmitted.SomeDataField}<font><br><br> </body>
                      </html>
                      %html%

                      if (email_smtp_open(ps, "your.domain.com", 25, "[email protected]", "smtpAuthPassword")) then
                      pm.to = "[email protected],[email protected],[email protected]"
                      pm.from = "[email protected]"
                      pm.subject = evaluate_string(msubject)
                      pm.message = ""
                      pm.attachments = ""
                      pm.html_message = evaluate_string(html_msg)

                      email_smtp_send(pm, ps)
                      end if
                      email_smtp_close(ps)


                      This does not require an email profile to be setup but fires email straight to the smtp server.

                      Cheers
                      if (email_smtp_open(ps, "your.domain.com", 25, "[email protected]", "smtpAuthPassword")) then

                      So your.domain.com = gmail.com
                      [email protected] = alias=gmail.com

                      Is that correct?

                      Comment


                        #12
                        Re: Emailing information help

                        So your.domain.com = gmail.com
                        [email protected] = alias=gmail.com

                        Sorry mistype so the last part is

                        [email protected] = [email protected]

                        Comment


                          #13
                          Re: Emailing information help

                          Originally posted by Atta View Post
                          So your.domain.com = gmail.com
                          [email protected] = alias=gmail.com

                          Sorry mistype so the last part is

                          [email protected] = [email protected]
                          PING?

                          Comment


                            #14
                            Re: Emailing information help

                            dim pm as P
                            dim ps as P
                            if (email_smtp_open(ps, "mail.alphasoftware.com", 25, "username", "password")) then
                            pm.to = "[email protected]"
                            pm.from = "[email protected]"
                            pm.subject = "my subject"
                            pm.html_message = "<HTML><B>This is the message in HTML</B></HTML>"
                            email_smtp_send(pm, ps)
                            end if
                            email_smtp_close(ps)

                            In this layout do I use mail.gmail.com, port 465, or gmail.com, port 25. It is just not working for me.

                            Thanks
                            Roelof

                            Comment


                              #15
                              Re: Emailing information help

                              I have started to debug and here is my code

                              debug(1)
                              if (email_smtp_open(ps, "gmail.com",465, "[email protected]", "password")) then
                              pm.to = "[email protected]"
                              pm.from = "[email protected]"
                              pm.subject = "my subject"
                              pm.message = "This is the message"
                              email_smtp_send(pm, ps)
                              end if
                              email_smtp_close(ps)

                              And what is does it jumps from IF statement to after the END IF statement, so it cannot open the smtp, can anyone give me some help in this?

                              Thanks
                              Roelof

                              Comment

                              Working...
                              X