Multiple sending of email with attachment - repost

后端 未结 3 1099
独厮守ぢ
独厮守ぢ 2021-01-17 05:58

I am re-posting this because no one answered my previous post.

I am trying to send emails to multiple recipients with respective pdf files attached. I was successful

相关标签:
3条回答
  • 2021-01-17 06:38

    I think your problem can be solved, just by using a calling a function check below tutorial link

    Check This

    For this use while loop, for retriving the pdf file name, and email of sender and call the function

    if (sendEmail("From Name", "from.email@yours.probably", "emailwhere@itgoes.to", "Email Subject", $msg,$_FILES['Attachment Name'])) {
    echo "Email sent"; }
    

    For Memory Limit reached,it depends on your email server, even php can send attachement of 100MB too..May be below link will help

    Click here

    hope it works!

    0 讨论(0)
  • 2021-01-17 06:39

        <?php 
        $i = 0;
          while($view = mysqli_fetch_array($result)){ 
            $i++; ?>
            <tr>
              <td>
                <label><?php echo $i . ". " . $view['name']; ?>&nbsp</label>
              </td>
              <td>
                <input type="text" name="receiverEmail<?php echo $i; ?>" id="receiverEmail<?php echo $i; ?>" value="<?php echo $view['email'] ?>" readonly style="width: 300px">
              </td>
              <td>
                <input type="file" name="receiverFile<?php echo $i; ?>" id="receiverFile<?php echo $i; ?>">
              </td>
            </tr>
            <tr style="height: 5px"></tr>
    
    
      <?php }?>
            <tr style="height: 15px"></tr>
            <tr>
              <td></td>
              <td></td>
              <td style="float: right">
                <input type="submit" name="submit" id="submit">
              </td>
            </tr>
    </form>
    
    0 讨论(0)
  • 2021-01-17 06:49

    You can't send different attachments to different recipients in one email. You will need to send separate emails.

    0 讨论(0)
提交回复
热议问题