Skip to main content
Hotel Guevarini uses PHPMailer to send transactional emails. SMTP credentials are configured directly inside each PHP file that sends mail — there is no centralized config file for email.

Files That Require SMTP Configuration

You must update the credentials in all four of the following files. Each one handles a different email flow, and a missing or incorrect credential in any single file will break that specific flow.
FileEmail Sent
php/auth/procesar_registro.phpAccount verification email sent after public self-registration
php/auth/enviar_recuperacion.phpPassword recovery link emailed to the user
php/auth/reenviar_verificacion.phpRe-sends the verification link to an unverified account
php/usuarios/guardar_usuario.phpVerification email sent when an administrator creates a user
You must update the SMTP credentials in all 4 files. Updating only some of them will leave certain email flows broken — for example, password recovery may work while admin-created user verification does not.

SMTP Configuration Block

Each of the four files contains a block like the following. The fields marked REEMPLAZAR (“replace”) must be filled in with your actual SMTP credentials:
$mail->isSMTP();
$mail->Host       = 'sandbox.smtp.mailtrap.io'; // O tu servidor SMTP
$mail->SMTPAuth   = true;
$mail->Username   = 'TU_USUARIO_SMTP';          // REEMPLAZAR
$mail->Password   = 'TU_PASSWORD_SMTP';          // REEMPLAZAR
$mail->SMTPSecure = 'tls';
$mail->Port       = 2525;

Setting Descriptions

SettingDescription
HostThe hostname of your SMTP server (e.g. sandbox.smtp.mailtrap.io or smtp.gmail.com).
SMTPAuthSet to true to authenticate with the SMTP server using the credentials below.
UsernameYour SMTP account username or API key, provided by your email service.
PasswordYour SMTP account password or API secret.
SMTPSecureEncryption method. 'tls' is used here, which works with STARTTLS on port 2525 or 587.
PortThe port your SMTP server listens on. Mailtrap sandbox uses 2525; most production providers use 587 (TLS) or 465 (SSL).

Example Configurations

Mailtrap’s sandbox captures all outgoing emails into a virtual inbox without delivering them to real addresses. This makes it ideal for local and staging environments.
$mail->Host       = 'sandbox.smtp.mailtrap.io';
$mail->SMTPAuth   = true;
$mail->Username   = 'your_mailtrap_username'; // from Mailtrap inbox credentials
$mail->Password   = 'your_mailtrap_password'; // from Mailtrap inbox credentials
$mail->SMTPSecure = 'tls';
$mail->Port       = 2525;
To get your credentials: log in to Mailtrap, open your inbox, go to SMTP Settings, and copy the username and password shown there.
Mailtrap is recommended for local and staging environments. It lets you test the full email flow — including clickable verification and recovery links — without risking mail delivery to real users or getting flagged as spam.

Where to Find the Block in Each File

The SMTP configuration appears inside a try block within the section of each file that handles email sending. Search for $mail->isSMTP() in any of the four files to jump directly to the configuration block.
$mail = new PHPMailer(true);
try {
    $mail->isSMTP();
    $mail->Host     = '...'; // <-- edit here
    $mail->Username = '...'; // <-- edit here
    $mail->Password = '...'; // <-- edit here
    $mail->Port     = ...;   // <-- edit here
    // ...
    $mail->send();
} catch (Exception $e) {
    // error handling
}