# Wild card modal email forwarding to rails application

**URL:** <https://www.ruby-forum.com/t/wild-card-modal-email-forwarding-to-rails-application/195080>\
**Category:** Rails\
**Created:** [September 16, 2010, 2:07pm UTC](https://www.ruby-forum.com/t/wild-card-modal-email-forwarding-to-rails-application/195080 "2010-09-16T14:07:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tom-mac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/bc8723/32.png) [@tom-mac](https://www.ruby-forum.com/u/tom-mac)\
**Post date:** [September 16, 2010, 2:07pm UTC](https://www.ruby-forum.com/t/wild-card-modal-email-forwarding-to-rails-application/195080/1 "2010-09-16T14:07:24Z")

</div>

Hi  
May be a long story. Sorry for that.My requirement as this. I have a  
saas application. The different people can create accounts. Each account  
holder can create users under them . An example is during account  
creation one user gives email as "removed\_email\_address@domain.invalid’. Then after login  
to application he creates say two users and gives (valid) emails as  
removed\_email\_address@domain.invalid and removed\_email\_address@domain.invalid.

At a later stage from the application he send mail to both the above  
users and they get mail in there gmail and yahoo inboxes. Also what is  
sent to them etc are stored to db also as a thread. Upto this everything  
works fine.

So coming to my requirement suppose removed\_email\_address@domain.invalid replies to this  
email. Then removed\_email\_address@domain.invalid gets email in his inbox(This also can be  
done). And also it has to be reached to my rails application . Dont know  
how to do this???.And also to be logged to my db.

```
The above is the original requirement. As part of that what I would

```

like to know is can I reply mail to removed\_email\_address@domain.invalid (An  
example is removed\_email\_address@domain.invalid) . The thing is removed\_email\_address@domain.invalid  
is not a valid email. Like that there may be removed\_email\_address@domain.invalid  
,removed\_email\_address@domain.invalid All these are dynamically created when replying.  
And what I need is, all these mails has to be reached at  
[mydomain.com](http://mydomain.com) and forwarded to my rails application. From there I can get  
the thread\_id from this mail (example 100 from removed\_email\_address@domain.invalid)  
and also the mail contents so that everything like subject,body etc can  
be stored to my db.

Dont know I could make you understand my requirement. Please tell if  
you did not understand. Guide me with your valuable comments

Thanks
