您现在的位置是:首页 > 教程 > ecshop商城教程ecshop商城教程
ecshop商城会员注册怎么实现注册自动发送邮件
痴梦2023-12-12 18:03:16ecshop商城教程已有人查阅
导读从数据库入手 用mysql管理工具找到 ecs_mail_templates 表插入一条 注册发送邮件的数据template_content 是邮件发邮件内容字段 根据自己的需要编辑不同的内容 当然等你添加成功后
从数据库入手 用mysql管理工具找到 ecs_mail_templates 表插入一条 注册发送邮件的数据
第二、在语言文件加入一行记录 找languages/zh_cn/admin/mail_template.php打开添加
INSERT INTO `ecs_mail_templates` (`template_id`, `template_code`, `is_html`, `template_subject`, `template_content`, `last_modify`, `last_send`, `type`) VALUES('', 'send_reg', 0, '注册确认', '{$user_name}您好!<br>\r\n<br>\r\n 恭喜你注册为会员\r\n\r\n{$shop_name}\r\n{$send_date}', 1228373714, 0, 'template');
template_content 是邮件发邮件内容字段 根据自己的需要编辑不同的内容 当然等你添加成功后去后台邮件模板管理可以去做管理编辑。第二、在语言文件加入一行记录 找languages/zh_cn/admin/mail_template.php打开添加
$_LANG['send_reg'] = '注册确认模板';
第三、修改注册文件 打开 user.php 找到
show_message(sprintf($_LANG['register_success'], $username . "$user->ucdata"), $_LANG['profile_lnk'], 'user.php', 'info', true);
在前面插入:
$tpl = get_mail_template('send_reg');
$smarty->assign('shop_name', $_CFG['shop_name']);
$smarty->assign('send_date', date($_CFG['time_format']));
$smarty->assign('user_name',$username);
$content = $smarty->fetch('str:' . $tpl['template_content']);
send_mail($_CFG['shop_name'], $email, $tpl['template_subject'], $content, $tpl['is_html']);
即:在(约233行)
$ucdata = empty($user->ucdata)? "" : $user->ucdata;
show_message(sprintf($_LANG['register_success'], $username . "$user->ucdata"), $_LANG['profile_lnk'], 'user.php', 'info', true);
之间插入以上代码。修改完毕注册测试去邮箱查看是否有新邮件,当然这个前提是我们的网站要可以发送邮件。
本文标签:
很赞哦! ()
相关文章
- ecshop商城首页增加一个商品浏览排行榜的实现方法
- ecshop商城怎么增加新独立页面
- ecshop商城安全优化ecshop防注入屏蔽SQL提示实例
- ecshop商城让所有页面都显示新文章提高SEO优化的实现方法
- ecshop商城SEO优化,ecshop预防死链站内页面301跳转写法
- ecshop商城后台订单选择加入商品时提示库存不足的修改方法
- ecshop商城商品搜索结果页显示商品货号的方法
- ecshop商城任意页面添加调用显示文章代码实例
- ecshop商城调用指定分类新品商品/热门商品/推荐商品可设置商品数量
- ecshop商城首页显示积分商品调用积分商品的代码示例
- ecshop商城数据备份搬家恢复数据步骤教程
- ecshop商城杂志管理设置说明介绍
随机图文
-
ecshop商品点击购买弹出漂亮窗口提示修改示例
点击“购买之后”弹出一个提示框框。我看过了代码之后感觉有点复杂。而且弹出的层实际上是利用样式的“显示”和“隐藏”的属 来做的!而且弹出的位置死板! -
ecshop商品页购买数量可以输入小数的解决方法
大多数的购物网站是不需要输入小数的,像卖衣服的,卖鞋的等等,但是有一些特殊的购物网站,购买数量是应该允许输入小数的,像卖菜的。 -
如何去掉删除ecshop后台升级补丁提示及删除云激活提示
怎么删除ECSHOP后台补丁升级提示及云升级提示?答:去掉admin/templates/start.htm中 -
ecshop模板标签ecshop开发修改经常用到模板标签
代码号整理下ecshop开发模板修改经常用到模板标签:很多用户想自己修改模板但是又不懂怎么修改今天代码号代码号整理一些ECSHOP模板制作修改经常用到ECSHOP模板标签
留言与评论 (共有 条评论) |