# Examples Known-good integration patterns for WireMail Google 1.0.0 / ProcessWire version 100. ## Transactional HTML email ```php $sent = wireMail() ->to('customer@example.com', 'Customer') ->subject('Your request was received') ->body('We received your request.') ->bodyHTML('
We received your request.
') ->send(); ``` ## Contact form Using the visitor as `from()` is safe with this provider: the configured Gmail account remains the real sender and the visitor becomes Reply-To. ```php $sent = wireMail() ->to('owner@example.com') ->from($sanitizer->email($input->post->email), $sanitizer->text($input->post->name)) ->subject('Website enquiry') ->body($sanitizer->textarea($input->post->message)) ->send(); ``` Keep the site's normal CSRF, validation, rate-limit and spam controls around public forms. ## Attachment ```php $sent = wireMail() ->to('person@example.com') ->subject('Invoice') ->body('The invoice is attached.') ->attachment($config->paths->assets . 'private/invoice.pdf', 'invoice.pdf') ->send(); ``` Only attach files already authorized for the recipient. ProcessWire verifies that the path exists when `attachment()` is called.