Scammell & Co Lawyers — More Experience | Better Outcomes
Tell us about the sale or purchase and we'll be in touch to open the file. Nothing here submits automatically — the final step opens your own email app with everything below already filled in, ready to send.
This determines what we ask for next.
I'm the person buying or selling.
I'm referring this matter on the client's behalf.
Under the AML/CTF Act, Scammell & Co Lawyers may share customer due diligence (CDD) information it holds on the client with a referring agency only where a documented reliance arrangement is in place between the firm and the agency, and the client has been informed their information may be shared on that basis.
'Could not read the submitted details.' ) );
}
$get = function ( $key ) use ( $data ) {
return isset( $data[ $key ] ) ? sanitize_text_field( $data[ $key ] ) : '';
};
$get_bool = function ( $key ) use ( $data ) {
return ! empty( $data[ $key ] );
};
$get_textarea = function ( $key ) use ( $data ) {
return isset( $data[ $key ] ) ? sanitize_textarea_field( $data[ $key ] ) : '';
};
$role = $get( 'role' ) === 'Agent' ? 'Agent' : 'Client';
$side = $get( 'side' );
$field_labels = array(
'name' => 'Full legal name(s)',
'dob' => 'Date of birth',
'address' => 'Current residential address',
'phone' => 'Best contact phone number',
'email' => 'Email address',
'office' => 'Preferred office',
'entityName' => 'Entity name',
'firbDetails' => 'FIRB approval details',
'sourceOfFunds' => 'Source of funds',
'propertyAddress' => 'Property address',
'price' => 'Agreed or expected price',
'deposit' => 'Deposit amount',
'settlementDate' => 'Preferred settlement date',
'specialConditions' => 'Special conditions',
'lenderName' => 'Lender name (purchase finance)',
'existingLenderName' => 'Lender name (existing mortgage)',
'notes' => 'Anything else',
);
$textarea_fields = array( 'firbDetails', 'sourceOfFunds', 'specialConditions', 'notes' );
$lines = array();
$lines[] = 'New conveyancing enquiry';
$lines[] = 'Submitted by: ' . ( 'Agent' === $role ? 'Real estate agent' : 'Client' );
if ( 'Agent' === $role ) {
$agency = $get( 'agencyName' );
$agent_name = $get( 'agentName' );
$agent_phone = $get( 'agentPhone' );
$agent_email = sanitize_email( isset( $data['agentEmail'] ) ? $data['agentEmail'] : '' );
$lines[] = 'Agency: ' . $agency;
$agent_line = 'Agent: ' . $agent_name;
if ( $agent_phone ) { $agent_line .= ' — ' . $agent_phone; }
if ( $agent_email ) { $agent_line .= ' — ' . $agent_email; }
$lines[] = $agent_line;
$lines[] = 'Reliance agreement confirmed: ' . ( $get_bool( 'relianceConsent' ) ? 'Yes' : 'No' );
}
$lines[] = 'Acting as: ' . ( $side ? $side : 'Not specified' );
$lines[] = 'Entity type: ' . $get( 'entityType' );
$lines[] = '';
foreach ( $field_labels as $key => $label ) {
$value = in_array( $key, $textarea_fields, true ) ? $get_textarea( $key ) : $get( $key );
if ( '' !== $value ) {
$lines[] = $label . ': ' . $value;
}
}
if ( $get_bool( 'strataFlag' ) ) { $lines[] = 'Strata/community title property: Yes'; }
if ( $get_bool( 'inspectionFlag' ) ) { $lines[] = 'Building & pest inspection requested: Yes'; }
if ( $get_bool( 'firbFlag' ) ) { $lines[] = 'FIRB applies: Yes'; }
if ( $get_bool( 'financedFlag' ) ) { $lines[] = 'Purchase is financed: Yes'; }
if ( $get_bool( 'existingMortgageFlag' ) ) { $lines[] = 'Existing mortgage on property: Yes'; }
$body = implode( "\n", $lines );
$display_name = $get( 'name' ) ?: 'New enquiry';
$property = $get( 'propertyAddress' );
$subject = 'Conveyancing enquiry — ' . $display_name . ( $property ? ' — ' . $property : '' );
$headers = array( 'Content-Type: text/plain; charset=UTF-8' );
// Reply-To the actual person, so the firm can hit "reply" directly.
$reply_to_email = 'Agent' === $role
? sanitize_email( isset( $data['agentEmail'] ) ? $data['agentEmail'] : '' )
: sanitize_email( isset( $data['email'] ) ? $data['email'] : '' );
if ( $reply_to_email && is_email( $reply_to_email ) ) {
$headers[] = 'Reply-To: ' . $reply_to_email;
}
$sent_to_firm = wp_mail( SCL_CONV_FIRM_EMAIL, $subject, $body, $headers );
// Acknowledgement email back to whoever submitted the form.
$ack_recipient = 'Agent' === $role
? sanitize_email( isset( $data['agentEmail'] ) ? $data['agentEmail'] : '' )
: sanitize_email( isset( $data['email'] ) ? $data['email'] : '' );
$ack_sent = false;
if ( $ack_recipient && is_email( $ack_recipient ) ) {
$ack_recipient_name = 'Agent' === $role ? $get( 'agentName' ) : $get( 'name' );
$greeting_name = $ack_recipient_name ? $ack_recipient_name : 'there';
$ack_subject = "We've received your conveyancing enquiry — Scammell & Co Lawyers";
$ack_body = "Hi {$greeting_name},\n\n";
$ack_body .= "Thanks for getting in touch. We've received the conveyancing enquiry you submitted";
$ack_body .= $property ? " for {$property}" : '';
$ack_body .= ", and a member of our team will be in contact shortly to open the file.\n\n";
$ack_body .= "If anything above needs correcting in the meantime, just reply to this email.\n\n";
$ack_body .= "Kind regards,\nScammell & Co Lawyers\nMore Experience | Better Outcomes";
$ack_headers = array( 'Content-Type: text/plain; charset=UTF-8' );
$ack_sent = wp_mail( $ack_recipient, $ack_subject, $ack_body, $ack_headers );
}
if ( $sent_to_firm ) {
wp_send_json_success( array( 'ack_sent' => $ack_sent ) );
} else {
wp_send_json_error( array( 'message' => 'The enquiry could not be sent — please call the office instead.' ) );
}
}
add_action( 'wp_ajax_scl_conveyancing_submit', 'scl_conv_handle_submit' );
add_action( 'wp_ajax_nopriv_scl_conveyancing_submit', 'scl_conv_handle_submit' );