Announcement

Collapse
No announcement yet.

[SOLVED] Send form by email using a form field

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

  • [SOLVED] Send form by email using a form field

    Hi,

    Please I need to send a form with 10 fields but I need to send the form with one of the form field that contains the email I need to send.

    Please I apreciate a code example.

    Thanks in advance

    Eduardo

  • #2
    You can generate a code snippet if you go into the onvalidate event and find the 'send email' code. Then you need to fill the recepient by your variable:

    Code:
    $mail_smtp_server = 'smtp.example.com';        // SMTP server name or IP address
    $mail_smtp_user   = 'login';                   // SMTP user name
    $mail_smtp_pass   = 'password';                // SMTP password
    $mail_from        = 'me@example.com';          // From email
    $mail_to          = {my_formfield}; // <=============================================
    $mail_subject     = 'Test message';            // Message subject
    $mail_message     = 'This is a test message.'; // Message body
    $mail_format      = 'T';                       // Message format: (T)ext or (H)tml
    
    // Send email";
    sc_mail_send($mail_smtp_server,
    			 $mail_smtp_user,
                 $mail_smtp_pass,
    			 $mail_from,
    			 $mail_to,
    			 $mail_subject,
    			 $mail_message,
    			 $mail_format);
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

    Comment


    • #3
      Excelent,

      It works

      Thanks,

      Eduardo

      Comment

      Working...
      X