Announcement

Collapse
No announcement yet.

Contact Form

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

  • Contact Form

    Was wondering if anyone had any sample contact forms.

    Trying to understand how to create one where i have a page where a person could enter a few lines and click a button and it would email 2 pre defined email addresses

  • #2
    Assuming your recipients are using IMAP, there's a number of examples already done:

    - Worm did a DLL example (SMTP_Send) a while back. But it doesn't support email accounts requiring SPA. Anyway, the original thread/example is HERE

    - Corey did an example that utilizes a simple PHP script. The original thread/example is HERE

    - LucasTheDuck did an eMail DLL (with example) attached below.
    - And Reteset did an SMTP action plugin (with example) attached below.

    I should point out that I personally have never managed to get any of these working with my email accounts which are all IMAP with SSL/TSS security. But who knows, maybe they'll work for yours?

    PS.
    Some of you guys really do need to get over your apparent genetic aversion to using the forum's Search button. If all else fails, try googling your search-term with 'indigorose' prefixed to it!
    Attached Files

    Comment


    • #3
      Hi,
      I made a Bulk Emailer some years ago for my niece to send emails for birthday party's etc without having to retype the message.I could not find it in my archives but fortunately I
      found it in my old work drive.I have revamped it, adding some new features etc.Here are some screen shots

      Click image for larger version

Name:	Emailer_Main.png
Views:	363
Size:	51.6 KB
ID:	302417 Click image for larger version

Name:	Emailer_account.png
Views:	256
Size:	50.5 KB
ID:	302418

      Click image for larger version

Name:	Emailer_Recip.png
Views:	252
Size:	12.0 KB
ID:	302419

      The prog uses SQLite to save the recipients name and email address also saves sever settings. I have set it to save database to HDD or autoplay docs folder but I would
      recommend saving to your hard drive.I have tested on two computers running Win7 and I think I have corrected any small bugs that I found.
      If you are using GMail you have to change your security settings to allow 3rd party apps to send or it definitely won't work.

      The other plugins I used are SMTP , GIF and GROUPBOX - [ATTACH]n302420[/ATTACH]

      The apz - [ATTACH]n302421[/ATTACH]

      This is totally free to use , mofify and distribute but please leave credits in globals.
      Cheers

      Comment


      • #4
        You can also use LuaSocket to send email via its SMTP module. See: here.
        For Gmail (and any other client using SSL security), you'd also need an SSL library such as LuaSec. See: here

        Here's an untested example of implementation:

        Code:
        local socket = require 'socket'
        local smtp = require 'socket.smtp'
        local ssl = require 'ssl'
        local https = require 'ssl.https'
        local ltn12 = require 'ltn12'
        
        function sslCreate()
            local sock = socket.tcp()
            return setmetatable({
                connect = function(_, host, port)
                    local r, e = sock:connect(host, port)
                    if not r then return r, e end
                    sock = ssl.wrap(sock, {mode='client', protocol='tlsv1'})
                    return sock:dohandshake()
                end
            }, {
                __index = function(t,n)
                    return function(_, ...)
                        return sock[n](sock, ...)
                    end
                end
            })
        end
        
        function sendMessage(subject, body)
            local msg = {
                headers = {
                    to = 'Your Target <target email>',
                    subject = subject
                },
                body = body
            }
        
            local ok, err = smtp.send {
                from = '<your email>',
                rcpt = '<target email>',
                source = smtp.message(msg),
                user = 'username',
                password = 'password',
                server = 'smtp.gmail.com',
                port = 465,
                create = sslCreate
            }
            if not ok then
                print("Mail send failed", err) -- better error handling required
            end
        end
        Nb. If you're unsure about how to make LuaSocket available to your project, see: here

        Comment


        • #5
          Originally posted by colc View Post
          Hi,
          I made a Bulk Emailer some years ago for my niece to send emails for birthday party's etc without having to retype the message.I could not find it in my archives but fortunately I
          found it in my old work drive.I have revamped it, adding some new features etc.Here are some screen shots

          [ATTACH=CONFIG]n302417[/ATTACH] [ATTACH=CONFIG]n302418[/ATTACH]

          [ATTACH=CONFIG]n302419[/ATTACH]

          The prog uses SQLite to save the recipients name and email address also saves sever settings. I have set it to save database to HDD or autoplay docs folder but I would
          recommend saving to your hard drive.I have tested on two computers running Win7 and I think I have corrected any small bugs that I found.
          If you are using GMail you have to change your security settings to allow 3rd party apps to send or it definitely won't work.

          The other plugins I used are SMTP , GIF and GROUPBOX - [ATTACH]n302420[/ATTACH]

          The apz - [ATTACH]n302421[/ATTACH]

          This is totally free to use , mofify and distribute but please leave credits in globals.
          Cheers
          Hello, after running, prompt the following error, can you help me? thanks
          _________________________________

          Starting build...
          19-Oct-20 10:40:56 AM
          Project file: C:\Users\Administrator\Documents\AutoPlay Media Studio 8\Projects\MyEmailer\MyEmail.autoplay.autoplay

          Performing Pre-Build Checks...
          Checking audio settings...
          Checking scripts...
          Checking project settings...
          Checking object settings...
          Merging inherited pages...
          Assigning tab indexes...
          Collecting Plugins...
          Error: Plugin "C:\Program Files (x86)\AutoPlay Media Studio 8 Trial\Plugins\Objects\GROUPBOX\GROUPBOX.APO" is not licensed for re-distribution

          1 Errors, 0 Warnings
          Build failed.

          Comment


          • #6
            Hi kevin8
            Yes you need the groupbox plugin
            unzip --> Folder to C:\Program Files (x86)\AutoPlay Media Studio 8 Trial\Plugins\Objects\
            GroupBox.zip
            Cheers

            Comment


            • #7
              Originally posted by colc View Post
              Hi kevin8
              Yes you need the groupbox plugin
              unzip --> Folder to C:\Program Files (x86)\AutoPlay Media Studio 8 Trial\Plugins\Objects\
              [ATTACH]n305651[/ATTACH]
              Cheers
              thanks a lot

              Comment

              Working...
              X