我有一个非常简单的前端表单,可以成功发送给自己,但是我不知道如何将副本发送到用户提供的电子邮件地址。
我是否认为我需要在控制器中添加一个数组,以使用户通过电子邮件向我发送对象,以便能够将其发送给他们?
我的HMTL表格:
private IEnumerator FadeOut()
{
Renderer rend = FadeSphere.GetComponent<Renderer>();
Color color = rend.material.color;
float speed = 5f;
float acceleration = 10f;
float alpha = 1f;
while (alpha > 0)
{
speed += Time.deltaTime * acceleration;
alpha -= Time.deltaTime * speed;
if (alpha < 0)
{
alpha = 0f;
}
rend.material.color = new Color(color.r, color.g, color.b, alpha);
yield return null;
}
}
在控制器中发送电子邮件的代码:
<div class="tab-content">
<div class="tab-pane" id="about">
<div class="row">
<h4 class="info-text"> Tell us about yourself and the project you are working on.</h4>
<div class="col-sm-5 col-sm-offset-1">
<div class="form-group">
<label><b>Contact Name</b> <small></small></label>
<input name="name" type="text" class="form-control" placeholder="Contact Name..." id="name" required>
</div>
<div class="form-group">
<label><b>Company</b><small></small></label>
<input name="company" type="text" class="form-control" placeholder="Company Name..." id="company" required>
</div>
<div class="form-group">
<label><b>Contact Number</b> <small></small></label>
<input name="phone" type="number" class="form-control" minlength="10" maxlength="15" placeholder="Number..." id="number" required>
</div>
</div>
<div class="col-sm-5 ">
<div class="form-group">
<label for="project"><b>Please tell us a little about the project you are working on</b> <small></small></label>
<textarea class="form-control" minlength="15" maxlength="255" name="project" rows="9" id="project" placeholder="Please enter project and building name..." required></textarea>
</div>
</div>
<div class="col-sm-10 col-sm-offset-1">
<div class="form-group">
<label><b>Email </b><small></small></label>
<input name="email" type="email" class="form-control" placeholder="email@email.com" id="email" required>
</div>
</div>
</div>
</div>
任何人都可以提供的帮助都会很棒。
谢谢
答案 0 :(得分:0)
是的
您可以在邮件功能中添加抄送。
Mail::to('builder.enquiries@gmail.com')
->cc(['abc@exabc.com','def@exabc.com'])
->send(new NewContactRequest($all_arrray));
希望这对您有所帮助。