# Re: Follow-Up: Receiving Inbound Email and Creating Data in

**URL:** <https://www.ruby-forum.com/t/re-follow-up-receiving-inbound-email-and-creating-data-in/91752>\
**Category:** Rails\
**Created:** [April 12, 2007, 2:16am UTC](https://www.ruby-forum.com/t/re-follow-up-receiving-inbound-email-and-creating-data-in/91752 "2007-04-12T02:16:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [April 12, 2007, 2:16am UTC](https://www.ruby-forum.com/t/re-follow-up-receiving-inbound-email-and-creating-data-in/91752/1 "2007-04-12T02:16:03Z")

</div>

Julien,

Thanks, I will probably end up with backgroundrb, which I have used in  
other situations with good results. I have just been trying to toy  
around and find something that would work and be a little more simple.

Thanks to all for the help. Julien, post a followup with you results if  
time allows.

Thanks,  
Nathan

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [April 18, 2007, 12:59am UTC](https://www.ruby-forum.com/t/re-follow-up-receiving-inbound-email-and-creating-data-in/91752/2 "2007-04-18T00:59:43Z")

</div>

One suggestion:

```
  imap.search(['ALL']).each do |message_id|
    msg = imap.fetch(message_id,'RFC822')[0].attr['RFC822']
    envelope = imap.fetch(message_id, "ENVELOPE")

```

[0].attr[“ENVELOPE”]  
Mailman.receive(msg)  
#Mark message as deleted and it will be removed from storage  
when user session closd  
imap.store(message\_id, “+FLAGS”, [:Deleted])  
end

Then you shouldn’t need to delete separately.

- Sai

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [April 18, 2007, 1:42am UTC](https://www.ruby-forum.com/t/re-follow-up-receiving-inbound-email-and-creating-data-in/91752/3 "2007-04-18T01:42:46Z")

</div>

On Tue, 2007-04-17 at 22:58 +0000, Sai E. wrote:

> ```
> end
> 
> ```
> 
> Then you shouldn’t need to delete separately.
> 
> - Sai

Sai,

Thanks, I will give this a try. I appreciate the help.

Nathan
