PHP回复错误 - 随机发送电子邮件而不是联系表单的发件人

时间:2016-10-21 04:13:23

标签: php html forms email

我在我的网站上设置了一个联系表格(通过Adobe Muse完成) 电子邮件设置为发送到多个地址

其中一个地址有自动确认退回电子邮件。 发件人地址不是表单中输入的电子邮件,而是与我的Adobe ID相关联的电子邮件,这意味着我收到了所有退回电子邮件,而其他人看起来这些表单来自单个电子邮件地址而非人员在网站上发送表格。

我设法跟踪表单本身的php代码,但在编码方面知识非常有限。 我怎样才能获得代码来制作"来自"地址或repyl-to与填写表格的人相同的地址

见下文

<?php 
/*  
If you see this text in your browser, PHP is not configured correctly on this hosting provider. 
Contact your hosting provider regarding PHP configuration for your site.

PHP file generated by Adobe Muse CC 2015.2.1.352
*/

require_once('form_process.php');

$form = array(
    'subject' => 'SSUPPORT FOR EXTENSIONS TO AVOCA BEACH PICTURE THEATRE IN LAND & ENVIRONMENT COURT - DA42661/2012 Submission',
    'heading' => 'New Form Submission',
    'success_redirect' => '',
    'resources' => array(
        'checkbox_checked' => 'Selected',
        'checkbox_unchecked' => 'Unselected',
        'submitted_from' => 'Form submitted from website: %s',
        'submitted_by' => 'Visitor IP address: %s',
        'too_many_submissions' => 'Too many recent submissions from this IP',
        'failed_to_send_email' => 'Failed to send email',
        'invalid_reCAPTCHA_private_key' => 'Invalid reCAPTCHA private key.',
        'invalid_field_type' => 'Unknown field type \'%s\'.',
        'invalid_form_config' => 'Field \'%s\' has an invalid configuration.',
        'unknown_method' => 'Unknown server request method'
    ),
    'email' => array(
        'from' => 'saveaseat@avocabeachpicturetheatre.com.au',
        'to' => 'saveaseat@avocabeachpicturetheatre.com.au,ask@centralcoast.nsw.gov.au,Carolyn.Wesley@gosford.nsw.gov.au,Ariella.Whitelum@gosford.nsw.gov.au'
    ),
    'fields' => array(
        'custom_U262562' => array(
            'order' => 1,
            'type' => 'string',
            'label' => 'Name',
            'required' => true,
            'errors' => array(
                'required' => 'Field \'Name\' is required.'
            )
        ),
        'Email' => array(
            'order' => 2,
            'type' => 'email',
            'label' => 'Email',
            'required' => true,
            'errors' => array(
                'required' => 'Field \'Email\' is required.',
                'format' => 'Field \'Email\' has an invalid email address.'
            )
        ),
        'custom_U262553' => array(
            'order' => 4,
            'type' => 'string',
            'label' => 'Message',
            'required' => false,
            'errors' => array(
            )
        ),
        'custom_U262696' => array(
            'order' => 3,
            'type' => 'string',
            'label' => 'Postcode',
            'required' => false,
            'errors' => array(
            )
        )
    )
);

process_form($form);
?>

1 个答案:

答案 0 :(得分:0)

或者,如果您在replay-to中添加email array,例如:

'email' => array(
    'from' => 'saveaseat@avocabeachpicturetheatre.com.au',
    'to' => 'saveaseat@avocabeachpicturetheatre.com.au,ask@centralcoast.nsw.gov.au,Carolyn.Wesley@gosford.nsw.gov.au,Ariella.Whitelum@gosford.nsw.gov.au',
    'replay-to' => 'Email for replay'
),