本文整理汇总了PHP中getEmail函数的典型用法代码示例。如果您正苦于以下问题:PHP getEmail函数的具体用法?PHP getEmail怎么用?PHP getEmail使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getEmail函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: kirim_undangan
function kirim_undangan($id)
{
if (!$this->ion_auth->logged_in()) {
redirect('auth/login', 'refresh');
}
$is_update = getValue('is_invited', 'users_resignment', array('id' => 'where/' . $id));
$undangan = array('is_invited' => 1, 'date_invitation' => date('Y-m-d', strtotime($this->input->post('date_invited'))), 'time_invitation' => $this->input->post('time_invited'), 'note_invitation' => $this->input->post('note_invited'));
$this->db->where('id', $id)->update('users_resignment', $undangan);
$sess_id = $this->session->userdata('user_id');
$user_id = getValue('user_id', 'users_resignment', array('id' => 'where/' . $id));
$url = base_url() . 'form_resignment/detail/' . $id;
$isi_email = $is_update == 0 ? get_name($sess_id) . " mengundang anda untuk melakukan wawancara pengajuan resign yang telah anda ajukan, untuk melihat detail silakan <a class='klikmail' href={$url}>Klik Disini</a><br />" : get_name($sess_id) . " melakukan perubahan jadwal wawancara pengajuan resign yang telah anda ajukan, untuk melihat detail silakan <a class='klikmail' href={$url}>Klik Disini</a><br />";
$subject = $is_update == 0 ? '' : 'Perubahan Jadwal ';
$data = array('sender_id' => get_nik($sess_id), 'receiver_id' => get_nik($user_id), 'sent_on' => date('Y-m-d-H-i-s', strtotime('now')), 'subject' => $subject . 'Undangan Wawancara Resignment', 'email_body' => $isi_email . $this->detail_email($id), 'is_read' => 0);
$this->db->insert('email', $data);
if (!empty(getEmail(get_nik($user_id)))) {
$this->send_email(getEmail($user_id), 'Undangan Wawancara Resignment', $isi_email);
}
}
示例2: changePass
function changePass($user, $pass)
{
$email = getEmail();
$salt = substr("{$user}", 0, 2);
$epass = crypt($pass, $salt);
$params = array('user' => $user, 'epass' => $epass);
$result = query("user.changePass", $params);
echo " <img src=\"icon_accept.gif\" border=\"0\" /> password has been updated!";
}
示例3: do_approve
function do_approve($id, $type)
{
if (!$this->ion_auth->logged_in()) {
redirect('auth/login', 'refresh');
} else {
$user_id = get_nik($this->session->userdata('user_id'));
$date_now = date('Y-m-d');
$data = array('is_app_' . $type => 1, 'approval_status_id_' . $type => $this->input->post('app_status_' . $type), 'user_app_' . $type => $user_id, 'date_app_' . $type => $date_now, 'note_' . $type => $this->input->post('note_' . $type));
$approval_status = $this->input->post('app_status_' . $type);
$this->recruitment_model->update($id, $data);
$approval_status_mail = getValue('title', 'approval_status', array('id' => 'where/' . $approval_status));
$user_recruitment_id = getValue('user_id', 'users_recruitment', array('id' => 'where/' . $id));
$isi_email = 'Status pengajuan recruitment anda ' . $approval_status_mail . ' oleh ' . get_name($user_id) . ' untuk detail silakan <a href=' . base_url() . 'form_recruitment/detail/' . $id . '>Klik Disini</a><br />';
$isi_email_request = get_name($user_recruitment_id) . ' mengajukan Permohonan recruitment, untuk melihat detail silakan <a href=' . base_url() . 'form_recruitment/detail/' . $id . '>Klik Disini</a><br />';
if ($is_app == 0) {
$this->approval->approve('recruitment', $id, $approval_status, $this->detail_email($id));
if (!empty(getEmail($user_recruitment_id))) {
$this->send_email(getEmail($user_recruitment_id), 'Status Pengajuan Permohonan Recruitment dari Atasan', $isi_email);
}
} else {
$this->approval->update_approve('recruitment', $id, $approval_status, $this->detail_email($id));
if (!empty(getEmail($user_recruitment_id))) {
$this->send_email(getEmail($user_recruitment_id), 'Perubahan Status Pengajuan Permohonan Recruitment dari Atasan', $isi_email);
}
}
if ($type !== 'hrd' && $approval_status == 1) {
$lv = substr($type, -1) + 1;
$lv_app = 'lv' . $lv;
$user_app = $lv < 4 ? getValue('user_app_' . $lv_app, 'users_recruitment', array('id' => 'where/' . $id)) : 0;
if (!empty($user_app)) {
if (!empty(getEmail($user_app))) {
$this->send_email(getEmail($user_app), 'Pengajuan Permohonan Recruitment', $isi_email_request);
}
$this->approval->request($lv_app, 'recruitment', $id, $user_recruitment_id, $this->detail_email($id));
} else {
if (!empty(getEmail($this->approval->approver('recruitment')))) {
$this->send_email(getEmail($this->approval->approver('recruitment')), 'Pengajuan Permohonan Recruitment', $isi_email_request);
}
$this->approval->request('hrd', 'recruitment', $id, $user_recruitment_id, $this->detail_email($id));
}
} else {
$email_body = "Status pengajuan permohonan recruitment yang diajukan oleh " . get_name($user_recruitment_id) . ' ' . $approval_status_mail . ' oleh ' . get_name($user_id) . ' untuk detail silakan <a href=' . base_url() . 'form_recruitment/detail/' . $id . '>Klik Disini</a><br />';
switch ($type) {
case 'lv1':
//$this->approval->not_approve('recruitment', $id, )
break;
case 'lv2':
$receiver_id = getValue('user_app_lv1', 'users_recruitment', array('id' => 'where/' . $id));
$this->approval->not_approve('recruitment', $id, $receiver_id, $approval_status, $this->detail_email($id));
if (!empty(getEmail($receiver_id))) {
$this->send_email(getEmail($receiver_id), 'Status Pengajuan Permohonan recruitment Dari Atasan', $email_body);
}
break;
case 'lv3':
$receiver_lv2 = getValue('user_app_lv2', 'users_recruitment', array('id' => 'where/' . $id));
$this->approval->not_approve('recruitment', $id, $receiver_lv2, $approval_status, $this->detail_email($id));
if (!empty(getEmail($receiver_lv2))) {
$this->send_email(getEmail($receiver_lv2), 'Status Pengajuan Permohonan recruitment Dari Atasan', $email_body);
}
$receiver_lv1 = getValue('user_app_lv1', 'users_recruitment', array('id' => 'where/' . $id));
$this->approval->not_approve('recruitment', $id, $receiver_lv1, $approval_status, $this->detail_email($id));
if (!empty(getEmail($receiver_lv1))) {
$this->send_email(getEmail($receiver_lv1), 'Status Pengajuan Permohonan recruitment Dari Atasan', $email_body);
}
break;
case 'hrd':
$receiver_lv3 = getValue('user_app_lv3', 'users_recruitment', array('id' => 'where/' . $id));
if (!empty($receiver_lv3)) {
$this->approval->not_approve('recruitment', $id, $receiver_lv3, $approval_status, $this->detail_email($id));
if (!empty(getEmail($receiver_lv3))) {
$this->send_email(getEmail($receiver_lv3), 'Status Pengajuan Permohonan recruitment Dari Atasan', $email_body);
}
}
$receiver_lv2 = getValue('user_app_lv2', 'users_recruitment', array('id' => 'where/' . $id));
if (!empty($receiver_lv2)) {
$this->approval->not_approve('recruitment', $id, $receiver_lv2, $approval_status, $this->detail_email($id));
if (!empty(getEmail($receiver_lv2))) {
$this->send_email(getEmail($receiver_lv2), 'Status Pengajuan Permohonan recruitment Dari Atasan', $email_body);
}
}
$receiver_lv1 = getValue('user_app_lv1', 'users_recruitment', array('id' => 'where/' . $id));
if (!empty($receiver_lv1)) {
$this->approval->not_approve('recruitment', $id, $receiver_lv1, $approval_status, $this->detail_email($id));
if (!empty(getEmail($receiver_lv1))) {
$this->send_email(getEmail($receiver_lv1), 'Status Pengajuan Permohonan recruitment Dari Atasan', $email_body);
}
}
break;
}
}
redirect('form_recruitment/approval/' . $id, 'refresh');
}
}
示例4: getEmail
<?php
function getEmail($name)
{
$sqlite = new PDO("sqlite:/usr/local/users.db");
$rows = $db->query("SELECT email FROM users WHERE name LIKE '{$name}'");
$row = $rows->fetch();
$email = $row['email'];
return $email;
}
$email = getEmail('Rasmus Lerdorf');
示例5: add
public function add()
{
$this->form_validation->set_rules('destination', 'Tujuan', 'trim|required');
$this->form_validation->set_rules('title', 'Tanggal Terakhir Cuti', 'trim|required');
$this->form_validation->set_rules('date_spd_start', 'Tanggal Berangkat', 'trim|required');
$this->form_validation->set_rules('date_spd_end', 'Tanggal Berangkat', 'trim|required');
$this->form_validation->set_rules('city_to', 'Kota Tujuan', 'trim|required');
$this->form_validation->set_rules('city_from', 'Kota Asal', 'trim|required');
$this->form_validation->set_rules('vehicle', 'Kendaraan', 'trim|required');
if ($this->form_validation->run() == FALSE) {
//echo json_encode(array('st'=>0, 'errors'=>validation_errors('<div class="alert alert-danger" role="alert">', '</div>')));
redirect('form_spd_luar_group/input', 'refresh');
} else {
$sess_id = $this->session->userdata('user_id');
$sess_nik = get_nik($sess_id);
$task_receiver = implode(',', $this->input->post('peserta'));
$additional_data = array('task_creator' => $this->input->post('emp_tc'), 'title' => $this->input->post('title'), 'destination' => $this->input->post('destination'), 'date_spd_start' => date('Y-m-d', strtotime($this->input->post('date_spd_start'))), 'date_spd_end' => date('Y-m-d', strtotime($this->input->post('date_spd_end'))), 'from_city_id' => $this->input->post('city_from'), 'to_city_id' => $this->input->post('city_to'), 'transportation_id' => $this->input->post('vehicle'), 'user_app_lv1' => $this->input->post('atasan1'), 'user_app_lv2' => $this->input->post('atasan2'), 'user_app_lv3' => $this->input->post('atasan3'), 'created_on' => date('Y-m-d', strtotime('now')), 'created_by' => $sess_id);
$task_creator = $this->input->post('emp_tc');
$created_by = $sess_nik;
$biaya_tambahan_id = $this->input->post('biaya_tambahan_id');
$biaya_tambahan = $this->input->post('jumlah_biaya_tambahan');
if ($this->form_validation->run() == true && $this->form_spd_luar_group_model->create_($task_receiver, $additional_data)) {
$spd_id = $this->db->insert_id();
$tr = $this->input->post('peserta');
if (!empty($biaya_tambahan_id)) {
for ($i = 0; $i < sizeof($tr); $i++) {
for ($j = 0; $j < sizeof($biaya_tambahan_id); $j++) {
$data = array('user_spd_luar_group_id' => $spd_id, 'user_id' => $tr[$i], 'pjd_biaya_id' => $biaya_tambahan_id[$j], 'jumlah_biaya' => str_replace(',', '', $biaya_tambahan[$j]), 'created_on' => date('Y-m-d', strtotime('now')), 'created_by' => $sess_id);
$this->db->insert('users_spd_luar_group_biaya', $data);
}
}
}
$task_receiver_id = explode(',', $task_receiver);
$this->send_spd_mail($spd_id, $task_creator, $task_receiver_id);
$user_app_lv1 = getValue('user_app_lv1', 'users_spd_luar_group', array('id' => 'where/' . $spd_id));
$isi_email = get_name($task_creator) . ' mengajukan Perjalanan Dinas Luar Kota, untuk melihat detail silakan <a href=' . base_url() . 'form_spd_luar_group/submit/' . $spd_id . '>Klik Disini</a><br />';
if ($task_creator !== $created_by) {
$this->approval->by_admin('spd_luar_group', $spd_id, $created_by, $task_creator, $this->detail_email_submit($spd_id));
}
if (!empty($user_app_lv1)) {
if (!empty(getEmail($user_app_lv1))) {
$this->send_email(getEmail($user_app_lv1), 'Pengajuan Perjalanan Dinas Luar Kota (Group)', $isi_email);
}
$this->approval->request('lv1', 'spd_luar_group', $spd_id, $task_creator, $this->detail_email_submit($spd_id));
} else {
if (!empty(getEmail($this->approval->approver('dinas')))) {
$this->send_email(getEmail($this->approval->approver('dinas')), 'Pengajuan Perjalanan Dinas Luar Kota (Group)', $isi_email);
}
$this->approval->request('hrd', 'spd_luar_group', $spd_id, $task_creator, $this->detail_email_submit($spd_id));
}
//echo json_encode(array('st' =>1));
redirect('form_spd_luar_group/input_biaya/' . $spd_id, 'refresh');
}
}
}
示例6: traiter
function traiter()
{
global $db_realmd;
$id = $_SESSION['id'];
if (empty($_POST['email'])) {
die("Vous n'avez pas rentré d'adresse email !");
}
$email = $_POST['email'];
if (!empty($_POST['mdp'])) {
$mdp = $_POST['mdp'];
$query = $db_realmd->query("SELECT `username` FROM `account` WHERE `id` = '" . $id . "' LIMIT 1");
$fetch = $query->fetch(PDO::FETCH_NUM);
$sha_pass = sha1(strtoupper($fetch[0]) . ':' . strtoupper($mdp));
try {
global $prepare_query_mdp;
$prepare_query_mdp->execute(array($sha_pass, $id));
} catch (Exception $e) {
die("Erreur lors de la requête du mot de passe <br/>Erreur à communiquer : " . $e->getMessage());
}
}
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
die("<div align=\"center\"><font color=\"red\">L'adresse email rentré n'a pas le bon format !</font></div>");
}
if ($email != getEmail()) {
global $prepare_query_email;
$prepare_query_email->execute(array($email, $id));
}
return true;
}
示例7: getContact
function getContact($idContact)
{
//Realiza el query en la base de datos
$mysqli = makeSqlConnection();
$sql = "SELECT * FROM contacts a LEFT JOIN contacts_cstm ac ON a.id = ac.id_c WHERE id = '{$idContact}'";
$res = $mysqli->query($sql);
$rows = array();
while ($r = mysqli_fetch_assoc($res)) {
$obj = (object) $r;
$obj->email_address = getEmail($idContact);
$obj->idAccount = getAccountId($idContact);
$obj->nameAccount = getAccountName($obj->idAccount);
$obj->reports_to_name = getContactName($obj->reports_to_id);
$obj->created_by_name = getUserName($obj->created_by);
$obj->modified_user_name = getUserName($obj->modified_user_id);
$obj->assigned_user_name = getUserName($obj->user_id_c);
$obj->nameCampaign = getCampaignName($obj->campaign_id);
$a = (array) $obj;
$rows[] = $a;
}
if (empty($rows)) {
return '{"results" :[]}';
} else {
//Convierte el arreglo en json y lo retorna
$temp = json_encode(utf8ize($rows));
return '{"results" :' . $temp . '}';
}
}
示例8: register_header
function register_header()
{
global $_G;
$inputemail = 'gp_' . $this->regemail['email'];
$_G['gp_email'] = $_G[$inputemail];
if ($_POST) {
$_G['gp_activationauth'] = strip_tags(str_replace(" ", "+", $_G['gp_activationauth']));
$activationinfo = authcode($_G['gp_activationauth'], $operation = 'DECODE');
$activationinfoname = preg_replace("/\\s.+/i", "", $activationinfo);
if ($activationinfoname) {
loaducenter();
if ($data = uc_get_user($activationinfoname)) {
list($uid, $username, $email) = $data;
}
$_G['gp_email'] = getEmail(strip_tags($email));
} else {
$_G['gp_email'] = getEmail(strip_tags($_G['gp_email']));
}
$_G['gp_rid'] = strip_tags($_G['gp_rid']);
if (!$_G['gp_rid']) {
showmessage('dsu_amufzc:1', '');
}
if (!$_G['gp_email']) {
showmessage('dsu_amufzc:5', '');
}
$amutb = DB::table("plugin_dsuamfzc");
$query = DB::fetch_first("SELECT * FROM {$amutb} WHERE rid = '" . $_G['gp_rid'] . "'");
if (!$query || $query['yes'] == '1') {
showmessage('dsu_amufzc:2', '');
}
if ($_G['gp_email'] != $query['email']) {
showmessage('dsu_amufzc:11', '');
}
}
}
示例9: login
function login($ip, $nick, $password)
{
/*$intentos = 0;
if (isset($_COOKIE['intentos'])){
$intentos = $_COOKIE['intentos'];
}
if ($intentos <= 3){*/
$hashedPassword = hash("sha256", $password, false);
if (checkNickPassword($nick, $hashedPassword)) {
$email = getEmail($nick);
$_SESSION['nick'] = $nick;
$_SESSION['email'] = $email;
$_SESSION['role'] = getRole($email);
//setcookie( 'intentos', 0, time() + 1800 ); //30 minutos
addAction($nick, $email, $ip, 'logged_in');
addConnection($nick, $email, $ip);
return '0';
// Logged.
} else {
//if ($intentos < 3) {
//setcookie( 'intentos', $intentos + 1, time() + 1800 ); //30 minutos
return '1';
// Log in failed.
}
/*}
setcookie( 'intentos', 0, time() + 1800);
return '2'; // Superado el límite de intentos.
*/
}
示例10: action
function action($data = array(), $post = array(), $id)
{
$ci =& get_instance();
$ci->load->library('session');
if (isset($this->ini['sandbox']) && isset($this->ini['api_login_id']) && isset($this->ini['transaction_key']) && isset($post['card_num']) && isset($post['exp_date'])) {
require dirname(__FILE__) . '/lib/shared/AuthorizeNetRequest.php';
require dirname(__FILE__) . '/lib/shared/AuthorizeNetTypes.php';
require dirname(__FILE__) . '/lib/shared/AuthorizeNetXMLResponse.php';
require dirname(__FILE__) . '/lib/shared/AuthorizeNetResponse.php';
require dirname(__FILE__) . '/lib/AuthorizeNetAIM.php';
define("AUTHORIZENET_API_LOGIN_ID", $this->ini['api_login_id']);
define("AUTHORIZENET_TRANSACTION_KEY", $this->ini['transaction_key']);
define("AUTHORIZENET_SANDBOX", $this->ini['sandbox']);
$sale = new AuthorizeNetAIM();
$sale->amount = number_format($data['amount'], 2);
$sale->card_num = $post['card_num'];
$sale->exp_date = $post['exp_date'];
$response = $sale->authorizeAndCapture();
if ($response->approved) {
$ci =& get_instance();
$ci->load->model('order_m');
$order = $ci->order_m->getOrderNumber($data['item_number']);
if (count($order) > 0) {
$update['status'] = 'completed';
$updatehis['order_id'] = $order->id;
$updatehis['label'] = 'order_status';
$updatehis['content'] = json_encode(array($order->order_number => 'completed'));
$updatehis['date'] = date('Y-m-d H:i:s');
$ci->order_m->_table_name = 'orders';
if ($ci->order_m->save($update, $order->id)) {
$ci->order_m->_table_name = 'orders_histories';
$ci->order_m->save($updatehis);
$ci->load->helper('cms');
$user = $ci->session->userdata('user');
//params shortcode email.
$params = array('username' => $user['username'], 'email' => $user['email'], 'date' => date('Y-m-d H:i:s'), 'shop' => getSiteName(config_item('site_name')), 'shop_url' => site_url(), 'total' => number_format($data['amount'], 2), 'order_number' => $data['item_number'], 'status' => 'completed');
//config email.
$config = array('mailtype' => 'html');
$subject = configEmail('sub_order_status', $params);
$message = configEmail('order_status', $params);
$ci->load->library('email', $config);
$ci->email->from(getEmail(config_item('admin_email')), getSiteName(config_item('site_name')));
$ci->email->to($user['email']);
$ci->email->subject($subject);
$ci->email->message($message);
$ci->email->send();
}
}
$ci->session->set_flashdata('msg', 'Thanks you for payment!');
if (isset($this->ini['message'])) {
$ci->session->set_flashdata('message', $this->ini['message']);
}
} else {
$ci->session->set_flashdata('error', 'Your payment not success!');
}
}
redirect(site_url('payment/confirm'));
}
示例11: createVCard
function createVCard($array)
{
$return = 'BEGIN:VCARD' . PHP_EOL;
$return .= 'VERSION:2.1' . PHP_EOL;
$return .= getName($array) . PHP_EOL;
$return .= getFormatedName($array) . PHP_EOL;
$return .= getPhoto($array);
$return .= getTelephonePrivate($array);
$return .= getMobilePrivate($array);
//$return .= 'TEL;WORK;VOICE:(0221) 9999123' . PHP_EOL;
//$return .= 'TEL;HOME;VOICE:(0221) 1234567' . PHP_EOL;
$return .= getAddress($array);
$return .= getEmail($array);
$return .= date('Y-m-d H:i:s') . PHP_EOL;
$return .= 'END:VCARD' . PHP_EOL;
return $return;
}
示例12: send_notification
function send_notification($id)
{
permissionUser();
$url = base_url() . $this->file_name . '/detail/' . $id;
$subject = 'Pengajuan Work Order';
$isi = getName(sessId()) . " membuat Work Order, Untuk melihat detail silakan <a href={$url}> KLIK DISINI </a>.";
$no = getValue('no', $this->table_name, array('id' => 'where/' . $id));
//SEND NOTIFICATION TO PRODUCTION
$group_id = array('8');
$user_id = $this->db->select('user_id')->where_in('group_id', $group_id)->get('users_groups')->result();
foreach ($user_id as $u) {
$data = array('sender_id' => sessId(), 'receiver_id' => $u->user_id, 'sent_on' => dateNow(), 'judul' => $subject, 'isi' => $isi, 'no' => $no, 'url' => $url);
$this->db->insert('notifikasi', $data);
$this->send_email(getEmail($u->user_id), $subject, $isi);
}
return TRUE;
}
示例13: indexAction
public function indexAction($maquina, $usuario)
{
$destinatario = $usuario . getEmail();
$message = \Swift_Message::newInstance()->setSubject('Soporte Tecnico Agrotecnica N° 4')->setFrom('sebas.29.8@gmail.com')->setTo($destinatario)->setBody($this->renderView('Emails/maquinaMail.html.twig', array('maquina' => $maquina), array('usuario' => $usuario)), 'text/html');
$this->get('mailer')->send($message);
/*
if ($mailer->send($message))
{
echo "Mensaje enviado correctamente";
}
else
{
echo "Mensaje fallido";
}
}
*/
//return $this->render(...);
}
示例14: getAdditionalInfoFromBD
function getAdditionalInfoFromBD($sql)
{
//Realiza el query en la base de datos
$mysqli = makeSqlConnection();
$res = $mysqli->query($sql);
$rows = array();
while ($r = mysqli_fetch_assoc($res)) {
$obj = (object) $r;
$obj->email_address = getEmail($obj->id);
$obj->campaign_name = getCampaignName($obj->campaign_id);
$a = (array) $obj;
$rows[] = $a;
}
if (empty($rows)) {
return '{"results" :[]}';
} else {
//Convierte el arreglo en json y lo retorna
$temp = json_encode(utf8ize($rows));
return '{"results" :' . $temp . '}';
}
}
示例15: store
public function store(Request $request)
{
$request = $request->input('email');
dd($request->getEmail());
//$dados = $request->all();
$dados = ['tb_nome' => $request->input('nome'), 'tb_email' => $request->input('email'), 'tb_data_nascimento' => $request->input('dataNasc'), 'tb_rg' => $request->input('rg'), 'tb_cpf' => $request->input('cpf'), 'tb_pais' => $request->input('pais'), 'tb_estado' => $request->input('estado'), 'tb_cidade' => $request->input('cidade'), 'tb_bairro' => $request->input('bairro'), 'tb_endereco' => $request->input('logradouro')];
$cadastrar = new \App\Models\ClienteModel();
$cadastrar->create($dados);
if ($cadastrar) {
$mail = ['nome' => $request->input('nome'), 'email' => $request->input('email'), 'data_nascimento' => $request->input('dataNasc'), 'rg' => $request->input('rg'), 'cpf' => $request->input('cpf'), 'pais' => $request->input('pais'), 'estado' => $request->input('estado'), 'cidade' => $request->input('cidade'), 'bairro' => $request->input('bairro'), 'endereco' => $request->input('logradouro')];
// dd($request->input('email'));
Mail::send('emails.contact', $mail, function ($msg) {
$email = $request->input('email');
$msg->{$email};
$msg->subject('Email de cadastro');
$msg->to(getEmail($request->input('email')));
});
Session::flash('message', 'Mensagem de criação de cadastro MedCenter');
return redirect('clientes')->with(['mensagem' => 'Cadastrado com sucesso!']);
} else {
return redirect('/');
}
}